MvcSiteMapProvider を使用しようとしていますが、独自のカスタム レイアウトを作成しようとしています。nuget を使用して MvcSiteMapProvider バージョン 3.2.3.0 をプロジェクトにインストールし、開発用にこのファイルを作成しました。ただし、ルート ノードの子をループしようとすると、何もありません。
<?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-3.0"
xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0 MvcSiteMapSchema.xsd"
enableLocalization="true">
<mvcSiteMapNode title="Home" controller="Home" action="Index">
<mvcSiteMapNode title="Reports" controller="Reports" action="Index"/>
<mvcSiteMapNode title="Queries" controller="Queries" action="Index"/>
<mvcSiteMapNode title="Tools" controller="Tools" action="Index">
<mvcSiteMapNode title="Markets" controller="Markets" action="Index">
<mvcSiteMapNode title="Boundary Files" controller="Markets" action="BoundaryFiles" />
<mvcSiteMapNode title="Mass Update" controller="Markets" action="MassUpdate" />
<mvcSiteMapNode title="SHOULD NOT BE HERE" controller="Home" action="Headings" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Categories" controller="Categories" action="Index"/>
<mvcSiteMapNode title="Blasts" controller="Blasts" action="Index">
<mvcSiteMapNode title="Get Blast" controller="Blasts" action="Get" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Alerts" controller="Alerts" action="Index"/>
<mvcSiteMapNode title="Applications" controller="Applications" action="Index"/>
</mvcSiteMapNode>
<mvcSiteMapNode title="Subscribers" controller="Subscribers" action="Index" />
</mvcSiteMapNode>
</mvcSiteMap>
ただし、ルート ノードには子がないようです。
何が悪いのかわかりません。ルートを実行されるアクションそのものに置き換え、同様の子を与えましたが、うまくいきませんでした:
<mvcSiteMapNode title="ASDFG" controller="Test" action="TestSiteMap">
<mvcSiteMapNode title="ASDFGHJKL" controller="Test" action="TestSiteMap"/>