ASP.Net - any way to get a SiteMapPath that can show siblings?

250 Views Asked by At

Is there any way to get a SiteMap control (ie. one that uses the Sitemap XML file) to display links to the sibling pages?

e.g. if my heirarchy is

Home
    Page1 (child of the home page)
    Page2 (another child of home page)
...

I would like a breadcrumb that when the user is looking at page 1 shows something like

> Home > Page1 / Page2

And allows them to click on Home to go to the Home page, or on Page 2 to go to Page 2. SiteMapPath itself seems to only support the link to Home page, so I'm wondering if there is a way to hack it, or an alternative control that will allow me to do this without too much additional code.

1

There are 1 best solutions below

0
Alexander On

SiteMapPath will only show the current path, not additional pages. But you can intercept the ItemCreated and ItemDataBound events and manipulate the items created there, like adding additional items and links.

Another option is to use the Menu control and force it to display after your liking with CSS.