Don't miss out Virtual Happy Hour today (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour today (April 26).
You can check in controller action / view if the page is opened in edit mode like this:
if (EPiServer.Editor.PageEditing.PageIsInEditMode) { ... }
Hope this helps
Is there any way to add a class to an element only when the site is viewed in the CMS? I want to hide certain elements on the end user site, but show the content in the CMS so clients can easily edit it.
Thanks!