If you know the exact number of levels, you can use SiteMapPath, for example:
<asp:SiteMapPath runat="server" ParentLevelsDisplayed="1" />
Otherwise, SiteMapPath always refers to the currently used SiteMapProvider, and you can probably connect to the SiteMapPath rendering to perform a check, for example:
protected void SiteMapPath_ItemCreated(object sender, SiteMapNodeItemEventArgs e) { if (e.Item.ItemType == SiteMapNodeItemType.Root || (e.Item.ItemType == SiteMapNodeItemType.PathSeparator && e.Item.ItemIndex == 1)) { e.Item.Visible = false; } }
which will make you SiteMapPath not show rootnode (and the first delimiter).
and if you want your node to display "Home", you can associate it with a different value, for example:
<asp:SiteMapPath ID="siteMapPath" runat="server" Pathseparator="/" OnItemCreated="SiteMapPath_ItemCreated"> <NodeTemplate> <a href='<%# Eval("url") %>'><%# Eval("description") %></a> </NodeTemplate> <CurrentNodeTemplate> <%# Eval("title") %> </CurrentNodeTemplate> </asp:SiteMapPath>
if the description is set to "Home" to be displayed.
source share