MvcSiteMapProvider
MvcSiteMapProvider copied to clipboard
"GrandparentNode" AttributeTarget
I recently came across the need to be able to specify the Title for the "grandparent" node of the current node.
My specific need involved drilling into archived content by year, month, and day. For example, given the snippet below, you might have a breadcrumb similar to: Archives / 2014 / November / 28th
.
[SiteMapTitle("ArchiveDay")]
[SiteMapTitle("ArchiveMonth", Target = AttributeTarget.ParentNode)]
[SiteMapTitle("ArchiveYear", Target = AttributeTarget.GrandparentNode)]
[Route("archives/{year}/{month}/{day}")]
public async Task<ActionResult> PostsByDay(int year, int month, int day)
{
...
Is there any interest in adding this functionality?