How to create a SharePoint 2010 web part page that inherits the site's left navigation
The subject line says it all… if you create a web part page in SharePoint 2010, by default you will have a page that has the top (global) navigation, but no current navigation on the left. This may be exactly what you want, as you will have a bit more space to work with. If you want to show the current navigation on the left hand side of a web part page, here is how to do it:
Go to the page that you want to add the left navigation to
Go to Site Actions – and launch “Edit in SharePoint Designer”. This will open the site in SharePoint Designer 2010. You’ll need to navigate to the actual location where the web part page is (usually Site Pages). Open the page you want to edit.
(standard disclaimer to edit a copy of your fancy web part page that your whole company depends on rather than editing the live original)Make a copy by right-clicking on the page, choosing copy, and then choosing paste
Right-click on the (copy of) the page you are going to edit to add the left-nav, and choose Edit File in Advanced Mode
Scroll to (or search for): body s4-leftpanel. Once you find it, you’ll want to comment out the following code:
1: <%-- <style type="text/css"> 2: body #s4-leftpanel { 3: display:none; 4: } 5: .s4-ca { 6: margin-left:0px; 7: } 8: </style> --%>
If you save and preview in browser, you’ll see we’ve made some progress, but we’re not quite there yet:
Scroll to (or search for): PlaceHolderNavSpacer and comment out the following two lines.
1: <%--
2: <asp:Content ContentPlaceHolderId="PlaceHolderNavSpacer" runat="server"></asp:Content>
3: <asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"></asp:Content>
4: --%>
Save the page, preview in browser, and voila! Your current navigation is now on the left. If you like the changes, rename your copy to the original filename and you are all set to go!
Comments
Anonymous
January 01, 2003
Thanks Sean. We had to follow a similar set of steps for getting this to work in MOSS 2007. I wasn't sure if anything had changed in 2010, but looks like it hasn't. Wondering if there is a reason why we don't have an option to enable the left nav through the UI without going through a messy SPD edit....Anonymous
April 20, 2011
This was perfect for what I am doing! I am having another issue however that maybe you could address...I am using the nightandday.master page for my site and on two web part pages that I created, my logo at the top of the page does not display. Do you have an advice?Anonymous
June 07, 2011
This was perfect. I found countless articles that I followed but flat out did not work. Thank you SeanAnonymous
June 29, 2011
Very useful article, Thanks Sean.Anonymous
October 17, 2011
Thanks smearp, this saved me a lot of time!Anonymous
November 16, 2011
I KNOW I've done this before in SP2010 and it worked perfectly, but had occasion to use this handy technique again today and no dice. New WebPart page, no content yet, comment the two lines, save it... no QuickLaunch... Did something change in SP2010 with recent CU or service pack for anyone else?Anonymous
March 08, 2012
Was exactly what I was looking for, thanks a lot man!Anonymous
April 22, 2012
This is great!!! thank you very much Sean...Anonymous
December 14, 2012
This did the trick! Thanks so much :) Would add though that I was working with the Adventure Works Master Page, so in Step 6, I had to remove the lines instead of just commenting them out.Anonymous
February 11, 2013
Thanks for the post :) Anyway I can set this as default for every new web part page I create?Anonymous
May 29, 2013
The comment has been removedAnonymous
October 08, 2013
The comment has been removedAnonymous
August 14, 2014
Worked great - thanksAnonymous
September 18, 2014
Works great !!Anonymous
September 26, 2014
THANK YOU SO MUCH FOR PUTTING THIS INFO ON THE INTERNET!Anonymous
October 22, 2014
Worked Perfectly!!Anonymous
April 22, 2015
The comment has been removedAnonymous
June 09, 2015
nike air max shoes
http://www.nikeairmaxretro.com/">nike air max
http://www.nikeairmaxhyperfuse.com/nike-air-max-90-c-8.html">Nike Air Max 90
http://www.nikeairmaxhyperfuse.com/nike-air-max-tumblr-c-10.html">nike air max tumblr
http://www.nikeairmaxretro.com/">nike air max for mens
http://www.nikeairmaxretro.com/">nike air max for womens
http://www.nikeairmaxretro.com/">air max shoes
http://www.nikeairmaxhyperfuse.com/nike-air-max-1-hyperfuse-c-1.html">Nike Air Max 1 Hyperfuse
http://www.nikeairmaxhyperfuse.com/nike-air-max-for-women-c-9.html">nike air max for women
http://www.nikeairmaxretro.com/">nikeairmaxretro.com
http://www.nikeairmaxretro.com/mens-nike-air-max-c-4.html">mens nike air max
http://www.nikeairmaxretro.com/nike-air-max-90-womens-c-5.html">nike air max 90 womens
http://www.nikeairmaxhyperfuse.com/">air max hyperfuse shoes
http://www.nikeairmaxhyperfuse.com/">nike air max 2015
http://www.nikeairmaxretro.com/nike-air-max-black-c-7.html">nike air max black
http://www.nikeairmaxretro.com/white-nike-air-max-90-c-10.html">white nike air max 90
http://www.nikeairmaxhyperfuse.com/">nike air max hyperfuse
http://www.nikeairmaxhyperfuse.com/">nike air max shoes for womens
http://www.nikeairmaxhyperfuse.com/">air max shoes
http://www.nikeairmaxhyperfuse.com/nike-air-max-1-hyperfuse-c-1.html">Nike Air Max 1 Hyperfuse
http://www.nikeairmaxhyperfuse.com/nike-air-max-for-women-c-9.html">nike air max for women
http://www.nikeairmaxhyperfuse.com/nike-air-max-shoes-c-12.html">nike air max shoes
http://www.nikeairmaxhyperfuse.com/nike-air-max-90-c-8.html">Nike Air Max 90
http://www.nikeairmaxhyperfuse.com/nike-air-max-tumblr-c-10.html">nike air max tumblrAnonymous
June 16, 2015
The comment has been removed