Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Shadar 6/21/2006 10:16 AM (edited 6/21/2006 10:18 AM)
I'm new to cuyahoga and was wondering if there is a built-in way to show a sitemappath? For example, if i am in /node1/node1.1/node1.11 i would print to the page " node1 > node1.1 > node1.11 " with links to each object except the current. In a normal asp.net 2.0 setup i would do this by creating a SiteMapPath asp object that references an xml document of the node objects. Is there a simple way to do this with cuyahoga using the navigation properties perhaps?

here is what i would do in the asp.net 2.0 setup:

default.master
<asp:SiteMapPath id="SiteMapPathNavigation" runat="Server" PathSeparator=" > " RenderCurrentNodeAsLink="true" />

web.config
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
  <providers>
    <add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
  </providers>
</siteMap>

web.sitemap
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
  <siteMapNode title="home" url="default.aspx">
    <siteMapNode title="page1" url="page1.aspx" >
      <siteMapNode title="page1a" url="page1/page1a.aspx" />
    </siteMapNode>
    <siteMapNode title="page2" url="page2.aspx" />
  </siteMapNode>
</siteMap>

if you were located on page1a.aspx it would print " home > page1 > page1a "

Thanks,
Tim
# mgaerber 6/22/2006 2:04 AM
Hi,

you could write a small module that achieves this.

In the module
Node n = this.Section.Node
gives you the current node and looping
n.ParentNode
you can get the higher level nodes to build your trail (reverse).

# Shadar 6/22/2006 9:00 AM
thats what I was thinking after examining the HierarchicalMenu control, thanks for the help

-Tim
# martijnb 6/23/2006 6:38 AM
In case you hadn't noticed this already: it's possible to attach modules to templates, so you only have to add this module once.
# Shadar 6/26/2006 10:41 AM
very cool, I didn't know that was possible... I'll definately be looking into it.

-Tim
# gedw99 7/7/2006 4:32 AM
Hey,

I was thinking of writing the same.

i believe tat what you are looking at building is called a "bread crumb" module.

# Nicole 7/9/2006 5:21 PM
Shadar, I don't think you could have possibly posted this at a more opportune time for me. I was about to dive into something similar. I will begin work on this tomorrow, so if I can contribute anything to this thread as I work on a breadcrumb navigation module, I will. I would love to see anything you come up with.