Tuesday, May 14, 2013

SharePoint 2010 - Web part page with Quick Launch

when you create webpart page, it is always created without quick launch. This is normal behavior of SharePoint. i have seen most of the developer stuck over here to get the quick launch.

Here is the solution to get quick launch on our new pages created using web part pages.

Before we see solution lets understand how and where quick launch is displayed.

SharePoint has master page  and each page is getting inherited from the master page. Quick launch is placed on master page under contentplaceholder id "PlaceHolderLeftNavBar" and Div Tag named as "s4-leftpanel"




Where as in webpart page this contentPlaceHolder is empty as well as the div "s4-leftpanel" which display the quick launch is hidden using script (See Below)




Solution:
  1. Remove hte ContentPlaceHolder with name "PlaceHolderLeftNavBar" from webpart Page
  2. Change the Display: None to Display: Block in CSS Script.

No comments: