1
<PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Display" SupressTag="True" CssClass="edit-mode-panel title-edit">
                            <span class="customerLabel">Namn: </span>
                             </PublishingWebControls:EditModePanel>

How could i hide customerLabel on edit mode and display in display mode? Doing like this nothing hapepns?

2 Answers 2

1

Just use this tag:

    <PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Display">
        [your stuff that you want only to be displayed out of EDIT mode]
    </PublishingWebControls:EditModePanel 
0

You're code sample looks 100% correct. Ensure you have PublishingWebControls registered.

<%@ Register TagPrefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Also verify that Page Layout file is checked in and published. Finally you may need to edit actual publishing page you're working with, and select this page Page Layout again for actual page to use the updated Page Layout.

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.