Enhancement Request: mvcSiteMapNodePlaceholder

Feb 19, 2010 at 8:03 PM

It might be interesting to be able to have a placeholder node that could render a partial view, that would take care of my previous post regarding having a dynamic link based on a calculation of today's date.  It might also be useful for adding a single field form into the navigation structure.

<mvcSiteMapNode title="Root" controller="RootController" action="Index">
    <mvcSiteMapNode title="Root Link 1" controller="RootController" action="Detail" id="1"/>
    <mvcSiteMapNode title="Root Link 2" controller="RootController" action="Detail" id="2"/>
    <mvcSiteMapNode title="Root Link 3" controller="RootController" action="Detail" id="3"/>
    <mvcSiteMapNode isPlaceholder="true" controller="myController" action="myAction"/> <--i.e. - Html.RenderAction
    <mvcSiteMapNode isPlaceholder="true" controller="myController" partialViewName="myPartialView"/>  <-- i.e. - Html.RenderPartial
</mvcSiteMapNode>

Then "myPartialView" could be:

<%= Html.ActionLink<myController>(c=>c.myAction(DateTime.Now.Add(-3)), "3 Days Ago") %>

Just a thought...

Coordinator
Feb 22, 2010 at 1:40 PM

This can be achieved using dynamic nodes. Partial views will not be taken into account, only route values.