1

In a Page component like Header or Footer are not editable,Is there a way that i can hide these component in Experience Editor mode. Or do not load the component at all in Experience Editor.

1
  • yes check if IsExpEditorMode , then dont load the inner html of header/footer and display a message to author - This content is not editable
    – Abhay Dhar
    Commented Apr 23, 2020 at 9:53

1 Answer 1

2

You can check if page is opened experience editor mode.

@if (!Sitecore.Context.PageMode.IsExperienceEditor)
{
  <!-- Header Markup -->
} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.