This is a migrated thread and some comments may be shown as answers.

Hide (don't display) specific nodes from MVCSitemapProvider

1 Answer 78 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
darenkov
Top achievements
Rank 1
darenkov asked on 17 Mar 2011, 09:21 AM
How do I prevent the telerik mvc menu from display some of the nodes in my XML sitemap structure?

For example I don't want certain items under the home category such as dislaimer, privacy policy etc. I used the code from the thread below this one to generate my sitemap/binding but how do I filter nodes I don't want to show in the Menu binding code?

<mvcSiteMapNode title="Home" controller="Home" action="Index" changeFrequency="Always" updatePriority="Normal">   
      <mvcSiteMapNode title="Disclaimer" controller="Home" action="disclaimer" />    <-- don't show
      <mvcSiteMapNode title="Privacy Policy" controller="Home" action="privacy" />    <-- don't show
      <mvcSiteMapNode title="Legals" controller="Home" action="legals" />                    <-- don't show
      <mvcSiteMapNode title="About Us" controller="AboutUs" action="Index">
             <mvcSiteMapNode title="About FPM" action="about-fpm" />
             <mvcSiteMapNode title="FPM Awards" action="fpm-awards" />
             <mvcSiteMapNode title="Why FPM DMA CFDs" action="why-fpm-dma-cfds" />
             <mvcSiteMapNode title="Contact Us" action="contact-us" />
    </mvcSiteMapNode>

1 Answer, 1 is accepted

Sort by
0
darenkov
Top achievements
Rank 1
answered on 28 Mar 2011, 07:55 AM
also i would like to know if there is a way to bind to a section of a sitemap?

is anybody responding in here?
Tags
Menu
Asked by
darenkov
Top achievements
Rank 1
Answers by
darenkov
Top achievements
Rank 1
Share this question
or