現在のノードの親のタイトルを表示できるようにしたいと思います。
サイトマップ:
<mvcSiteMapNode title="Main Site Tile" controller="Home" action="Index">
<mvcSiteMapNode title="Some site section" controller="Section" action="Index">
<mvcSiteMapNode title="Some page" controller="Section" action="Page1" />
<mvcSiteMapNode title="Some other page" controller="Section" action="Page2" />
</mvcSiteMapNode>
</mvcSiteMapNode>
したがって、「Page1」では、次を使用してタイトル (一部のページ) を表示できます。
Html.MvcSiteMap().SiteMapTitle()
偉大な。ただし、_Layout ページに親ノード (いくつかのサイト セクション) のタイトルも表示したいので、'Page1' または 'Page2' (または実際にネストされたビュー) を表示している場合、これは同じように表示されます。
これは可能ですか?