I want show only my parent nodes in my View. This is my sitemap:
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0" enableLocalization="true">
<mvcSiteMapNode title="Home" controller="Home" action="Index">
<mvcSiteMapNode title="About" controller="Home" action="About"/>
<mvcSiteMapNode title="Contact" controller="Home" action="Contact"/>
</mvcSiteMapNode>
<mvcSiteMapNode title="Test" controller="Test" action="Index">
<mvcSiteMapNode title="Teste2" controller="Test" action="Index"/>
<mvcSiteMapNode title="Teste3" controller="Test" action="Index"/>
</mvcSiteMapNode>
</mvcSiteMap>
How can I use the html helper @Html.MvcSiteMap().Menu() to show only the parent nodes, and only the child nodes? Like this: Parents:
- Home
- Test
Childs
- About
- Contacts
- Teste2
- Teste3
Thanks.