Reputation: 3896
I have a menu for my site, using a sitemap file and role provider to generate the links based on role.
When the menu was created manually, the links looked like this:
Link1 | Link2 | Link3 | etc...
now its on a hover type of menu which is what i don't want:
Link1
|___ Link2___Link3
|___ Link4
How can I get it to look as the first type?
My first time using sitemap for menu navigation so not too sure how to create the <siteMapNodes>
I assume its due to this:
<siteMapNode url="~/Reporting.aspx" title="Reporting" description="" roles="MyRole" >
<siteMapNode url="~/Auditing.aspx" title="Auditing" description="" roles="MyRole"/>
<siteMapNode url="~/TeamManager.aspx" title="Team Manager" description="" roles="MyRole"/>
</siteMapNode>
Upvotes: 2
Views: 1183
Reputation: 7223
I would also suggest to use a jQuery plugin to build up the navigation from the Site collection if you are using menu-kind structure.
Upvotes: 0
Reputation: 885
A sitemap will nest items if the XML in the sitemap code is nested.
The following will show:
Link1 | Link2 | Link3
<siteMapNode url="Link1Url" title="Link1" />
<siteMapNode url="Link2Url" title="Link2" />
<siteMapNode url="Link3Url" title="Link3" />
The following will show:
Link1
|-Link2
|-Link3
<siteMapNode url="Link1Url" title="Link1">
<siteMapNode url="Link2Url" title="Link2" />
<siteMapNode url="Link3Url" title="Link3" />
</siteMapNode>
Your full Web.sitemap will look something like the following:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" enableLocalization="true" >
<siteMapNode url="~/" title="Home">
<siteMapNode url="Link1Url" title="Link1" />
<siteMapNode url="Link2Url" title="Link2" />
<siteMapNode url="Link3Url" title="Link3" />
</siteMapNode>
</siteMap>
Upvotes: 4