Passing optional parameters

Aug 5, 2010 at 12:27 AM

The following code:

[MvcSiteMapNode(ParentKey="List", Key="Details")]

[SiteMapTitle("CustomerName")]

 

public ActionResult Details(int id)

{

    Return View()

}

does not attach the optional Id parameter when it renders the breadcrumb link?

I saw on previous post the same issue. Has this issue been resolved yet?

Coordinator
Aug 5, 2010 at 7:18 AM

What do you mean by "does not attach"? Can you explain a bit more?

Aug 5, 2010 at 5:09 PM

When the page renders with the breadcrumbs are basically hyperlinks with an href to a View (example) http://localhost/MusicSite/Music/Details.

If I’m passing an id around such as MusicSite/Music/Details/3, the “3” Id parameter  is not being persisted so, I lose my Id for the details page when I click the breadcrumb link.

I’m seeing from other post the parameters are not being persisted in the breadcrumb links. Can you point me to a link or forum on how to persist the parameters?

PS. Great tool by the way!!

-jp

From: maartenba [mailto:notifications@codeplex.com]
Sent: Thursday, August 05, 2010 4:25 AM
To: James Pruitt
Subject: Re: Passing optional parameters [mvcsitemap:222508]

From: maartenba

What do you mean by "does not attach"? Can you explain a bit more?

Read the full discussion online.

To add a post to this discussion, reply to this email (mvcsitemap@discussions.codeplex.com)

To start a new discussion for this project, email mvcsitemap@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Coordinator
Aug 9, 2010 at 9:26 AM

Best way there is to use the dynamic sitemap provider extensibility point (see project home page for the link)