Setting Visibility of Content on Page Layouts

If you previously worked with page layouts in SharePoint Server 2007 then you might already be aware of the EditModePanel control, which was used to show content based on whether the page was set to edit or display mode. In fact, page layouts in SharePoint Server 2010 continue to employ the edit mode panel to manage content such as selectively using different CSS files based on whether a page is set to edit or view mode.

For instance, in the ArticleLeft.aspx page layout, shown in Figure 15.47, the two styles—edit-mode-21.css and page-layouts-21.css—are used when the page is set to edit mode and are enclosed in <PublishingWebControls:EditModePanel> tags. The After property ensures that the edit-mode-21.css ...

Get Microsoft® SharePoint® Designer 2010 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.