Question

I am constructing a Wizard, and use the same "Master" Controller and Action to orchestrate which child controller and action is called to implement the step.

I am trying to put together a breadcrumb trail to represent the Wizard flow, with some difficulty. It is not helped by the fact that one cannot have multiple "mvcSiteMapNode"s in mvc.SiteMap with the same controller and action. It seems to need the master controller name ie "Wizard" and "Index" as opposed to the child controller name ie "Step1" and "Index".

So, on its own, this will work:

                  <mvcSiteMapNode title="Step1" controller="Wizard" action="Index" preservedRouteParameters="id" route="Wizard"/>

However I would like to do, for multiple wizard steps:

                  <mvcSiteMapNode title="Step1" controller="Wizard" action="Index" preservedRouteParameters="id" route="Wizard"/>
                  <mvcSiteMapNode title="Step2" controller="Wizard" action="Index" preservedRouteParameters="id" route="Wizard"/>

But the above will not work, unless there is another way to differentiate these nodes.

Any wisdom appreciated!

Thanks.

Was it helpful?

Solution

Just found the answer.

Yes it is possible, as long as identical controller/action nodes are not siblings, ie make them children.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top