Node Attributes Appended to QueryString

Dec 17, 2010 at 11:19 AM
Edited Dec 17, 2010 at 11:19 AM

Hi, my site map has the following node:

<mvcSiteMapNode title="Home" controller="Home" action="Index" pageTitle="Home Page" metaDescription="Blah blah blah">

Now in my master page i can say <%= SiteMap.CurrentNode["MetaDescription"] %> to display the meta description.  So far so good but if i click on the home link in the breadcrumb the pageTitle and metaDescription gets appended to the query string.  I can understand the need for this but is there a way to stop certain attributes being part of the url.

I'd appreciate the help.  Thanks

Coordinator
Dec 21, 2010 at 1:44 PM

This can be done by setting the "attributesToIgnore" attribute in Web.config. Set it to attributesToIgnore="pageTitle;metaDescription" and you're done :-)

(see http://mvcsitemap.codeplex.com/wikipage?title=Registering%20the%20provider&referringTitle=Home)

Dec 21, 2010 at 2:46 PM

Awesome.  Knew it would be something simple.  Cheers for your help.