0
votes

I'm creating a web part page in SP 2010 with one column only , but it's covering my left navigation. How to make it appear only in body area of the page ?

alt text

Also, Is it possible to create "web part" library where by clicking of "new document" button it allows to create web part page.

Updates: Second part is done if we create document library with "Web part" content type.

Rishi

2
What did you mean by covering my left navigation? Any screenshot?Shoban
Shoban, It's overwriting the left navigation. attaching the screen above.Ris

2 Answers

2
votes

So in SP2010, you'll need to do a little more than remove the "PlaceHolderLeftNavBar" and "PlaceHolderNavSpacer" tags.

There are style settings that control the display and padding of the area, that cause the Left Nav Bar not be displayed. So, look for the tag below, it controls the display mode and left-margin width of the nav bar. If you go the modification route, you'll need to change display to auto or inherit and give the left-margin a nice size of say 200px or so...

<SharePoint:UIVersionedContent ID="WebPartPageHideQLStyles" UIVersion="4" runat="server">
<ContentTemplate>
<style type="text/css">
    body #s4-leftpanel {
        display:none; // change here
    }
    .s4-ca {
        margin-left:0px; // change here
    }
</style>
</ContentTemplate>
</SharePoint:UIVersionedContent>
0
votes

It sounds like your problem might be that the page layout for the web part page is not overriding the display of the left navigation. This was the case in 2007 and seems like it might be the case in 2010 page layouts as well.

If this is the problem, what you need to do is to edit the page layout (or just the one web part page) to remove the following lines:

<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"></asp:Content>

and

<asp:Content ContentPlaceHolderId="PlaceHolderNavSpacer" runat="server"></asp:Content> 

These are set by the master page to contain the left navigation, but if your page layout overrides them then they will not display.

Here is a blog post on this from 2007.