views:

132

answers:

3

Hi,

I have a few items apart of my Web.sitemap file that rely on querystring or session variables. I do not want these items to appear in my menu.

Is there a way to hide it from the menu, but still be in the sitemap (for sitepath control).

Thanks

A: 

I believe you use the attribute show="false", like so:

<siteMapNode show="false" url="~/admin/submissionsaddedit.aspx" title="Add/Edit Submission"  description="" roles="Administrator, Shortlister, Moderator"/>
Carson63000
This didn't do anything :SAre you sure this works?
Mike
Carson63000
A: 

I used this article when I wanted to stop an node from appearing I found this article great:

http://runtingsproper.blogspot.com/2009/11/i-bet-you-didn-know-that-adding-custom.html

ASP.NET does have functionality to control which nodes you want displayed but I believe this is tied to Membership/Roles.

Dal
Thanks. Awesome.
Mike
A: 

Solved it...

I just made the title of the siteMapNode I want to be hidden to "[hidden]". In the .cs file the sitemap control sits I did this...

protected void rmMenu_ItemDataBound(object sender, RadMenuEventArgs e)

{ if (e.Item.Text == "[hidden]") e.Item.Remove(); }

dimos