Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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!

share|improve this question

3 Answers 3

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" SupressTag="True"><h1><SharePointWebControls:FieldValue 
FieldName="Title" runat="server" ID="TitleDisplay" /></h1></PublishingWebControls:EditModePanel>

as stated in the documentation here

share|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.


share|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

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

share|improve this answer
Thanks Guys, I know I am new at this and I understand what the differences between an Edit and Display panel are. The problem is I am getting that additional div inserted outside the H1 tags. This is messing with my layouts. What I am expecting to see is just a plain H1 tag wrapping around the title value. Do you guys have an idea as to why that DIV is getting inserted? –  mdumka Mar 13 '13 at 21:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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