Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

SiteMapPath? Options
Shadar
Posted: Wednesday, June 21, 2006 1:16:04 AM
Rank: Newbie
Groups: Member

Joined: 2/15/2006
Posts: 3
Points: 0
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
Code:

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


web.config
Code:

<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
Code:

<?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
Posted: Wednesday, June 21, 2006 5:04:38 PM
Rank: Advanced Member
Groups: Member

Joined: 4/26/2005
Posts: 213
Points: 165
Location: Germany
Hi,

you could write a small module that achieves this.

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

Shadar
Posted: Thursday, June 22, 2006 12:00:03 AM
Rank: Newbie
Groups: Member

Joined: 2/15/2006
Posts: 3
Points: 0
thats what I was thinking after examining the HierarchicalMenu control, thanks for the help

-Tim
martijnb
Posted: Thursday, June 22, 2006 9:38:48 PM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
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
Posted: Monday, June 26, 2006 1:41:07 AM
Rank: Newbie
Groups: Member

Joined: 2/15/2006
Posts: 3
Points: 0
very cool, I didn't know that was possible... I'll definately be looking into it.

-Tim
gedw99
Posted: Thursday, July 6, 2006 7:32:38 PM
Rank: Advanced Member
Groups: Member

Joined: 4/3/2006
Posts: 243
Points: 450
Location: the moon :)
Hey,

I was thinking of writing the same.

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



if your doing it hard your probably doing it the wrong way....
Nicole
Posted: Sunday, July 9, 2006 8:21:02 AM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2006
Posts: 31
Points: 0
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.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.