Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140817

Sitefinity - Conditionals in grid widget?

$
0
0

I am working in a greenfield Sitefinity 12.2 site. I am rendering the site's header and footer using custom grid widgets with placeholders defined for widgets like the site navigation. In the header is a flyout menu with placeholders I would like to populate with widgets on my page template. Unfortunately, I need to disable the site's custom Javascript when in designer mode to prevent issues with the editing tools, so I can't access the flyout menu through normal means since it is toggled via custom Javascript.

Ideally, I would like to conditionally render an alternative view of the flyout menu when in page designer mode to allow authors to modify the content of those placeholders. In a Razor file this is possible with something like

@if (SystemManager.IsDesignMode)

but grid widgets use .html files so Razor syntax isn't available. Is there any sort of attribute I can apply to a tag in a grid widget template to tell Sitefinity to render markup only in designer mode? If not, are there any other best practices I should be following to avoid this type of situation?


Viewing all articles
Browse latest Browse all 140817

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>