Monday, January 11, 2010

Completely Remove Left Navigation from v4. master Page

hi,

yesterday i was goign through the htmls of master page, the big difference I found is tables has been replaced by <Div>. The team gave OOB minimal v4.0 Master page also v3.0 master pages are present.

I was trying to remove left navigation completely, after investing some time below are the steps to do it -
look for div id="s4-leftpanel" class="s4-notdlg"
right click on it, select tag, remove that complete portion. you just removed the left navigation..every thing Quick launch,Recycle Bin. But to work the master page properly add the removed contentPlace Holders again, below are the contentPalce holder which should be added at minimum to work it proper -
<asp:ContentPlaceHolder id="PlaceHolderLeftNavBarDataSource" runat="server" />
<asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat="server" />
<asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server"></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id="PlaceHolderLeftNavBarTop" runat="server"/>
<asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server"></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id="PlaceHolderQuickLaunchTop" runat="server"></asp:ContentPlaceHolde>

now to use the complete space occuiped by left nagivation ->
Div with ContentID = MSO_ContentTable has a style class s4-ca which sets left margin to 115, make it to 0 and you are done.
it should look like -
div class="s4-ca s4-ca-dlgNoRibbon" id="MSO_ContentTable" style="margin-left:0px"

Done..use compelet space now!!

No comments:

Post a Comment