1

Im working on some requested changes for a sharepoint site. One of these changes is the requirement of having a global menu across multiple site collections.

This menu needs to be on the masterpage in the header, and requires that, on hover, it expands the menu.

I found some other place where a previous developer had achieved this, and it involved in creating a farm solution that builds the siteMap using nodes, then passes the SiteMapNodeCollection back to a SharePoint:AspMenu.

So far this is all and well, and I have managed to style it how I would like it.

This is the code added to the masterpage...

<div class="menu">
    <div id="main-navigation">
          <!--MS:<SharePoint:AjaxDelta id="DeltaTopNavigation" BlockElement="true" CssClass="ms-displayInline" runat="server">-->
          <!--MS:<SharePoint:DelegateControl runat="server" ControlId="GlobalNavigationDataSource" Id="globalNavigationDelegate">-->
          <!--MS:<template_controls>-->
          <!--MS:<asp:SiteMapDataSource ShowStartingNode="False" SiteMapProvider="SPNavigationProvider" id="topSiteMap" runat="server" StartingNodeUrl="sid:1002" />-->
          <!--MS:</template_controls>-->
          <!--MS:</SharePoint:DelegateControl>-->
          <!--MS:<asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">-->
          <!--MS:<SharePoint:AspMenu ID="GlobalNavigationMenu" Runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="&lt;%$Resources:wss,navigation_accesskey%&gt;" UseSimpleRendering="true" RenderMode="List" UseSeparateCss="true" Orientation="Horizontal" StaticDisplayLevels="2" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="2" StaticEnableDefaultPopOutImage="false" DynamicEnableDefaultPopOutImage="false" SkipLinkText="" />-->
          <!--MS:</asp:ContentPlaceHolder>-->
          <!--MS:</SharePoint:AjaxDelta>-->
    </div>
</div>

And this is how it looks..

enter image description here

But now, there is a button also on the page which when clicked displays a full-screen overlay menu, and this menu should not have any 'flyouts' and just be in a standard list format, like this... (this is a mockup)

enter image description here

Ive managed to get the same menu onto this overlay, using a different ID name and all that, but I cant seem to figure out how to style it or 'render it' so it is a list, and not a flyout menu..

this is the code I have for this..

<div class="overlayMenu">
        <div id="overlayMenu-navigation">
            <!--MS:<SharePoint:AjaxDelta id="OverlayTopNavigation" BlockElement="true" CssClass="ms-displayInline" runat="server">-->
            <!--MS:<SharePoint:DelegateControl runat="server" ControlId="OverlayMenuNavigationDataSource" Id="overlayMenuNavigationDelegate">-->
            <!--MS:<template_controls>-->
            <!--MS:<asp:SiteMapDataSource ShowStartingNode="False" SiteMapProvider="SPNavigationProvider" id="overlaySiteMap" runat="server" StartingNodeUrl="sid:1002" />-->
            <!--MS:</template_controls>-->
            <!--MS:</SharePoint:DelegateControl>-->
            <!--MS:<asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">-->
            <!--MS:<SharePoint:AspMenu ID="OverlayNavigationMenu" Runat="server" EnableViewState="false" DataSourceID="overlaySiteMap" AccessKey="&lt;%$Resources:wss,navigation_accesskey%&gt;" UseSimpleRendering="true" RenderMode="List" UseSeparateCss="true" Orientation="Horizontal" StaticDisplayLevels="2" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="2" StaticEnableDefaultPopOutImage="false" DynamicEnableDefaultPopOutImage="false" SkipLinkText="" />-->
            <!--MS:</asp:ContentPlaceHolder>-->
            <!--MS:</SharePoint:AjaxDelta>-->
        </div>
    </div>

Ive been trying to figure out if its a property or setting on the SharePoint:AspMenu line, but I cant seem to figure it out or find anymore information. Im not keen on hacking away at the CSS to try and remove the flyout effect that I have in the first example, and hoping its just like a 'toggle' somewhere...

Any ideas or suggesstions would be greatly appreciated! Thanks!!

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.