Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am developing a custom branding for my SharePoint 2013 site.

I have a single master page, and two page layouts - HomePageLayout and ThreeColumnPageLayout.

I want the ThreeColumnPageLayout to have the quick launch appear in the leftmost column. However I cannot use the provided snippets to add the quick launch to a page layout - only a master page. Granted I can use CSS/JS trickery to put the Quick Launch on the master page and then only cause it to show up when a certain page layout is used, but this seems like a hack to me and a waste of bandwidth.

Is there no way to add the Quick Launch to a page layout? This is what I tried:

<div id="sideNavBox" class="ms-dialogHidden ms-forceWrap ms-noList">
    <div class="ms-core-navigation">
        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server">-->
            <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server"/>-->
            <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchTop" runat="server"/>-->
            <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server"/>-->
            <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server"/>-->
            <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server"/>-->
            <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchBottom" runat="server"/>-->
        <!--ME:</asp:ContentPlaceHolder>-->
    </div>
</div>

this didn't work - whenever i upload the html file with this code block in it, it fails to update the aspx file, and results in the problem described here: Design Manager not updating aspx from my html

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It's not possible to remove the QuickLaunch navigation from the masterpage as it is necessary for other functionality in sharepoint to work.

I don't see what the issue is hiding it with CSS and then in your pagelayout insert a <style> tag included some CSS to show it again when needed.

It's not a hack. It's a workaround which is very much recommended.

share|improve this answer
    
Workaround, hack, same thing. Well I suppose if it is needed on the master page for other things to work, then that would make sense. It doesn't make sense to me that it would be needed for other things to work when you can hide it, but I understand that's the nature of crazy SharePoint javascript. –  Nacht Mar 6 '13 at 22:01
    
The problem I have is that I want the Quick Launch inside my page layout content... So the only thing I can think of is to put it on the master page and then use jquery to move it inside the div i want it in, which seems like it might be costly to do on every page load –  Nacht Mar 6 '13 at 22:04
    
Hi I have a similar requirement. I have added the snippet to a custom welcome layout page which has bootstrap containers. Does convert successfully but when I set as default layout for a team page .. I don't see any links .. if fact all I can see is my hardcoded html, either side of the snippet. –  westerdaled Apr 10 at 12:21
    
@westerdaled I'm not sure I understand you completely. You have implemented the Css workaround, but when you apply the pagelayout as default layout for team sites, you can't see the links in the quicklaunch? Sounds to me like a navigation configration issue more than a Css issue? –  Daniel Ziga Apr 10 at 13:29
    
@DanielZiga .. yes I want to apply a page layout for all my team sites but will the OOTB navigation aka quick links. I have yet apply my CSS as I don't see any output - created a test team site with page from Layout. I thought I could use the snippet above but I suspect I will need to write some jquery with CSOM as it will need to auto display each library we add .. Seems like plumbing code to me so should really be a standard control... –  westerdaled Apr 10 at 17:06

I got quick launch to work in a page layout by posting the following code into my pagelayout HTML file. I placed it in a bootstrap column and it renders correctly with one caveat. the "View All Site Content" link does not render. Can't seem to figure out exactly why, the contentPlaceHolder is created on page load, but none of the code is rendered to create it.

None the less, if you want Quick Launch in a page layout, add the code below. My testing is with a MasterPage that has the Quick launch removed, so there is no duplication of code.

<div id="sideNavBox" class="ms-dialogHidden ms-forceWrap ms-noList">
    <!--SPM:<SharePoint:AjaxDelta id="DeltaPlaceHolderLeftNavBar" BlockElement="true" CssClass="ms-core-navigation" role="navigation" runat="server">-->
    <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server">-->
    <a id="startNavigation" name="startNavigation" tabIndex="-1">
    </a>
    <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderLeftNavBarTop" runat="server"/>-->
    <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderQuickLaunchTop" runat="server"/>-->
    <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderLeftNavBarDataSource" runat="server"/>-->
    <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat="server"/>-->
    <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server"/>-->
    <div class="ms-core-sideNavBox-removeLeftMargin">
        <!--SPM:<SharePoint:SPNavigationManager
id="QuickLaunchNavigationManager"
runat="server" 
QuickLaunchControlId="V4QuickLaunchMenu"
ContainedControl="QuickLaunch"
EnableViewState="false"
>-->
        <!--SPM:<SharePoint:DelegateControl runat="server" 
    ControlId="QuickLaunchDataSource">-->
        <!--SPM:<Template_Controls>-->
        <!--SPM:<asp:SiteMapDataSource 
            SiteMapProvider="SPNavigationProvider" 
            ShowStartingNode="False"
            id="QuickLaunchSiteMap" 
            StartingNodeUrl="sid:1025" 
            runat="server"
/>-->
        <!--SPM:</Template_Controls>-->
        <!--SPM:</SharePoint:DelegateControl>-->
        <!--SPM:<SharePoint:AspMenu
    id="V4QuickLaunchMenu"
    runat="server"
    EnableViewState="false" 
    DataSourceId="QuickLaunchSiteMap"
    UseSimpleRendering="true"
    Orientation="Vertical"
    StaticDisplayLevels="1"
    AdjustForShowStartingNode="true"
    MaximumDynamicDisplayLevels="1"
    SkipLinkText=""
/>-->
        <!--SPM:</SharePoint:SPNavigationManager>-->
        <!--SPM:<SharePoint:SPNavigationManager
    id="TreeViewNavigationManagerV4"
    runat="server" 
    ContainedControl="TreeView"
    CssClass="ms-tv-box"
>-->
        <!--SPM:<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/_layouts/15/viewlsts.aspx" id="idNavLinkSiteHierarchyV4" Text="&#60;%$Resources:wss,treeview_header%&#62;" accesskey="&#60;%$Resources:wss,quiklnch_allcontent_AK%&#62;" 
    CssClass="ms-tv-header"/>-->
        <!--SPM:<SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">-->
        <!--SPM:<Template_Controls>-->
        <!--SPM:<SharePoint:SPHierarchyDataSourceControl
                runat="server"
                id="TreeViewDataSourceV4"
                RootContextObject="Web"
                IncludeDiscussionFolders="true"
/>-->
        <!--SPM:<SharePoint:SPRememberScroll runat="server" id="TreeViewRememberScrollV4" onscroll="javascript:_spRecordScrollPositions(this);" 
                style="overflow: auto;">-->
        <!--SPM:<SharePoint:SPTreeView
                id="WebTreeViewV4"
                runat="server"
                ShowLines="false"
                DataSourceId="TreeViewDataSourceV4"
                ExpandDepth="0"
                SelectedNodeStyle-CssClass="ms-tv-selected"
                NodeStyle-CssClass="ms-tv-item"
                SkipLinkText=""
                NodeIndent="12"
                ExpandImageUrl="/_layouts/15/images/tvclosed.png?rev=23"
                ExpandImageUrlRtl="/_layouts/15/images/tvclosedrtl.png?rev=23"
                CollapseImageUrl="/_layouts/15/images/tvopen.png?rev=23"
                CollapseImageUrlRtl="/_layouts/15/images/tvopenrtl.png?rev=23"
                NoExpandImageUrl="/_layouts/15/images/tvblank.gif?rev=23" 
>-->
        <!--SPM:</SharePoint:SPTreeView>-->
        <!--SPM:</SharePoint:SPRememberScroll>-->
        <!--SPM:</Template_Controls>-->
        <!--SPM:</SharePoint:DelegateControl>-->
        <!--SPM:</SharePoint:SPNavigationManager>-->
        <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderQuickLaunchBottom" runat="server">-->
        <div class="ms-core-listMenu-verticalBox">
            <!--SPM:<SharePoint:ClusteredSPLinkButton
            runat="server"
            id="idNavLinkViewAll"
            PermissionsString="ViewFormPages"
            NavigateUrl="~site/_layouts/15/viewlsts.aspx"
            Text="&#60;%$Resources:wss,AllSiteContentMore%&#62;"
            accesskey="&#60;%$Resources:wss,quiklnch_allcontent_AK%&#62;"
            CssClass="ms-core-listMenu-item ms-core-listMenu-heading"/>-->
            <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><a id="ctl00_idNavLinkViewAll" accesskey="3" class="ms-core-listMenu-item ms-core-listMenu-heading" href="#"><span class="ms-splinkbutton-text">All Site Content</span></a><!--PE: End of READ-ONLY PREVIEW-->
        </div>
        <!--SPM:</asp:ContentPlaceHolder>-->
    </div>
    <!--SPM:</asp:ContentPlaceHolder>-->
    <!--SPM:</SharePoint:AjaxDelta>-->
</div> <!-- END QuickLaunch Code -->
share|improve this answer
    
Hi this is quite close what I am looking for and in my case the View Site Content works with the above code. let me know how I can help? Next I need to make the links have alternate styles to match the rest of my branding –  westerdaled May 2 at 14:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.