Reputation: 60
I have a web site using MvcSiteMapProvider for the main navigation. I have run into a scenario that I'm unable to figure out.
My site has the following navigation:
The site map looks like:
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0" enableLocalization="true">
<mvcSiteMapNode title="Look Up" controller="Lookup" action="Index">
<mvcSiteMapNode title="PackingList" controller="PackingList" action="Index">
<mvcSiteMapNode title="Configuration" controller="Configuration" action="Printers">
<mvcSiteMapNode title="Printers" controller="Configuration" action="Printers" />
<mvcSiteMapNode title="Quick List" controller="Configuration" action="QuickList" />
</mvcSiteMapNode>
</mvcSiteMapNode>
</mvcSiteMap>
I have not been able to figure out how to properly leverage the site map for the side tab navigation reliably. I also need to have the Configuration tab remain selected as well as the active side tab.
Upvotes: 1
Views: 902
Reputation: 2733
When two nodes have the same controller and action name, the SiteMapProvider cannot determine which node is active, and it always chooses the first matching node, in this case 'Configuration'.
The only way to make both nodes selected is:
Upvotes: 2