asp.net - SiteMapPath not working with route attribute in nodes -
i have xml sitemap:
<?xml version="1.0" encoding="utf-8" ?> <mvcsitemap xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://mvcsitemap.codeplex.com/schemas/mvcsitemap-file-4.0" xsi:schemalocation="http://mvcsitemap.codeplex.com/schemas/mvcsitemap-file-4.0 mvcsitemapschema.xsd"> <mvcsitemapnode title="home" controller="home" action="index" key="home"> <mvcsitemapnode title="access control" route="accesscontrol_default" controller="home" action="index" key="access-control"> <mvcsitemapnode title="my dashboard" route="accesscontrol_default" controller="dashboard" action="index" key="dashboard"/> <mvcsitemapnode title="personnel" route="accesscontrol_default" clickable="false" key="personnel"> <mvcsitemapnode title="groups" route="accesscontrol_default" controller="personnel" action="groups" key="groups"/> <mvcsitemapnode title="members" route="accesscontrol_default" controller="personnel" action="people" key="people"/> </mvcsitemapnode> </mvcsitemapnode> </mvcsitemapnode> </mvcsitemap>
this targeted route defined in area route configuration:
context.maproute( "accesscontrol_default", "accesscontrol/{controller}/{action}/{id}", new { controller = "home", action = "index", id = urlparameter.optional }, new[] { "ui.webportal.areas.accesscontrol.controllers" } );
then navigation menu tree shown @html.mvcsitemap().sitemap()
breadcrumb not working when using @html.mvcsitemap().sitemappath()
. because i'm using routing explicitly? , solution?
while use areas, add area="...."
nodes under them.
... <mvcsitemapnode title="groups" route="accesscontrol_default" area="accesscontrol" controller="personnel" action="groups" key="groups"/> ...
Comments
Post a Comment