0

I have a sitemap node and the format is as follows:

<mvcSitemapenode title="A"/>

Is it possible to get the parent node using Mvcsitemap() in the cshtml file?

4

1 回答 1

1

您应该能够像这样获得父节点:

@Html.MvcSiteMap().Provider.CurrentNode.ParentNode

提供者继承自抽象的SiteMapProvider

于 2013-01-03T09:17:29.943 回答