Web Part pages with Quick Launch

You've probably ran into this issue before: you create a web part page, but the newly created page has no Quick Launch (the navigation menu on the side.) That's not a bug. For some reason it is by design.

In the past (SharePoint 2007) you could open the page in SharePoint Designer for editing, delete the following placeholders and the Quick Launch would magically reappear:
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderNavSpacer" runat="server"></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"></asp:Content>
In SharePoint 2010 you have to delete another control in addition to those placeholders:
<SharePoint:UIVersionedContent ID="WebPartPageHideQLStyles" UIVersion="4" runat="server">
    <ContentTemplate>
        <style type="text/css">
            body #s4-leftpanel {
            display:none;
            }
            .s4-ca {
            margin-left:0px;
            }
        </style>
    </ContentTemplate>
</SharePoint:UIVersionedContent>
The only side effect I can think of is that the page becomes unghosted (no longer based on the site definition.) Which is all right.

Print Friendly and PDF

4 comments:

Ron said...

Good tip. I'll keep that in mind.

Bryon said...

This doesn't seem to work. Designer will not let me remove these areas.

Max said...

you need to edit in advanced mode.

Muyo said...

Many of many of Many Thanks a lot, it works, you saved my day

Post a Comment