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

On the v4.master I have an Sharepoint:Menu, and I would like to know how to enable the parent link. Wich property should I change on the SharePoint:AspMenu ?

At the moment the parent has an anchor with href="#", but I would like to configure it to be clicable and redirected to the correct link.

The ASP.Net code:

<div>

            <SharePoint:DelegateControl runat="server" ControlId="QuickLaunchDataSource">
                <Template_Controls>
                <asp:SiteMapDataSource SiteMapProvider="SPNavigationProvider" ShowStartingNode="True" id="QuickLaunchSiteMap" StartingNodeUrl="sid:1025" runat="server" />
             </Template_Controls>
            </SharePoint:DelegateControl>
            <SharePoint:UIVersionedContent UIVersion="3" runat="server">
                <ContentTemplate>
                    <SharePoint:AspMenu id="QuickLaunchMenu" runat="server" DataSourceId="QuickLaunchSiteMap" Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true" MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="0" SkipLinkText="" CssClass="s4-die">
                        <LevelMenuItemStyles>
                            <asp:menuitemstyle CssClass="ms-navheader" />
                            <asp:menuitemstyle CssClass="ms-navitem" />
                        </LevelMenuItemStyles>
                        <LevelSubMenuStyles>
                            <asp:submenustyle CssClass="ms-navSubMenu1" />
                            <asp:submenustyle CssClass="ms-navSubMenu2" />
                        </LevelSubMenuStyles>
                        <LevelSelectedStyles>
                            <asp:menuitemstyle CssClass="ms-selectednavheader" />
                            <asp:menuitemstyle CssClass="ms-selectednav" />
                        </LevelSelectedStyles>
                    </SharePoint:AspMenu>
                </ContentTemplate>
            </SharePoint:UIVersionedContent>
            <SharePoint:UIVersionedContent UIVersion="4" runat="server">
                <ContentTemplate>
                    <SharePoint:AspMenu id="V4QuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="QuickLaunchSiteMap" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Vertical" StaticDisplayLevels="3" MaximumDynamicDisplayLevels="3" SkipLinkText="" CssClass="s4-ql" />
                </ContentTemplate>
            </SharePoint:UIVersionedContent>
        </div>

The HTML is generated as:

CHILD NODE:

<li class="static">
<a class="static menu-item" href="/aaa/bbb">
<span class="additional-background">
<span class="menu-item-text">aadasa</span>
</span>
</a>
</li>

PARENT NODE:

<li class="static">
<a class="static menu-item close" href="#">
<span class="additional-background">
<span class="menu-item-text">dasd</span>
</span>
</a>
</li>
share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.