I have a strange problem I can't seem to find a solution for or why it is even happening.

I have a page layout, in the page layout I have the title in an edit mode panel ...

<!-- Edit Title -->
    <PublishingWebControls:EditModePanel runat=server 
    FieldName="Title" runat="server" ID="TitleEdit" /></PublishingWebControls:EditModePanel>

Then I have a display mode panel to wrap it with a H1 tag ...

<!-- Display Title -->
    <PublishingWebControls:EditModePanel runat=server 
    FieldName="Title" runat="server" ID="TitleDisplay" /></h1></PublishingWebControls:EditModePanel>

Everything should be great, but when I view the code this is what I see ...

<!-- Display Title --><div><h1>Sign-up forms</h1></div>

I have no idea what is going on ... Thanks for any help!

  • What did you expect to see? The Edit Mode-panels are evaluated server side, and the server then generates HTML accordingly and sends to the client – Robert Lindgren Mar 12 '13 at 7:09

To exclude the outer DIVs from the output you should set the property "SuppressTag" on your EditModePanel like:

<!-- Display Title -->
<PublishingWebControls:EditModePanel runat="server" 
PageDisplayMode="Display" SuppressTag="True"><h1><SharePointWebControls:FieldValue 
FieldName="Title" runat="server" ID="TitleDisplay" /></h1></PublishingWebControls:EditModePanel>

as stated in the documentation here

| improve this answer | |

An editmodepanel is a panel that will show the content for which the PageDisplayMode is set. When you are editing the page the content which have the PageDisplayMode set to "Edit" will be shown. When you're just viewing the page the content which have the pagedisplaymode set to "Display" will be shown. This is great when you for example want to have metadata field that the editor can fill in and you don't want it to be displayed for the ordinary viewer. You can also use the EditModePanel to have different rendering for the same field when viewing or editing.


| improve this answer | |
  • Sorry Robert but I unanswered your question because when I tried to use 'supress tags = true' it simply hid the contents of what ever was in the panel. I ment to get back to you with an update along with the reason mentioned. so sorry if I seemed rude :) – mdumka Apr 4 '13 at 20:49
  • That seems odd since that SupressTag should do the trick, and actually do in my environment! But I do see that runat="server" was missing it's quotes in my code – Robert Lindgren Apr 5 '13 at 12:59

The edit mode panel allows adding or not the container div element. It is rendered by default, but can be removed using the property:


In the previous answers there's a Typo - SuppressTag should be with double 'p'


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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