Aspnet Treeview limit source page level

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

I have below sitemap as source for treeview that sits on master pages..
Is there a way to limit source for treeview to page level..
When i cruise the pages i would like to see only related nodes for that
page versus see all nodes in every page
Example would be..
A.aspx would show only
a.aspx
b.aspx
instead of showing all tree.....?


<siteMapNode url="Default.aspx" title="Home" description="Home">
<siteMapNode url="A.aspx" title="A" description="A Desc" />
<siteMapNode url="a.aspx" title="a" description="a Desc" />
<siteMapNode url="b.aspx" title="a" description="a Desc" />

<siteMapNode url="B.aspx" title="B" description="B Desc " />
<siteMapNode url="C.aspx" title="C" description="C Desc" />
</siteMapNode>

</siteMap>
 
Hi,

you can do something like that if you have a SiteMapDataSource control in
use. Set StartFromCurrentNode="True" when it would switch the display to
always start from the Page you are navigating on. Then set
StartingNodeOffSet="n" where n is the number levels to display up (up or
down based on do you give negative or positive value)

Though it seems that your nodes are on the same level-
 
Back
Top