SiteMapPath Control and dynamic items

R

Robert Camsky

Hi,
I've got web.sitemap file with few nodes and subnodes and SiteMapPath
control. It works fine.
But imagine, I'm worrking on an calender implemented this way:

calendar.aspx -> showing upcomming events
calendar.apsx?year=2005 showing calendar for year 2005
calendar.apsx?year=2005&month=1 showing january in 2005
calendar.aspx?year=2005&month=1&day=1 showing 1/1/2005

and in my web.sitemap I've defined only
<siteMapNode url="~/Calendar.aspx" title="Calendar" description=""/>

By this implementation SiteMapPath control shows i.e "Home > Calendar" all
the time. I would like to ask you, if I can get following results easilly.
"Home>Calendar>2005"
"Home>Calendar>2005>January"
"Home>Calendar>2005>January>1"

BTW: of course I dont wan't to add manually every SiteMapNode for every item
into web.sitemap file ;)

Do you have any link to example I need? Or your own solution? I'll be
pleased with any response.
Thanks before for your answer.
Regards
Robert
 
S

Scott Allen

You'll want to override the SiteMapProvider's SiteMapResolve event.
You can inject dynamic site nodes into the SiteMapPath by retuning
them from this event. You can google for SiteMapResolve and come up
with a samples, but feel free to post questions, because it is a
tricky event to manage, IMHO.
 
S

Scott Allen

Scott, glad to see you in this topic as I've learned a lot from your early
work in this context. Have you blogged the methodology to support multiple
SiteMapPaths yet?

No Clinton, I haven't gotten around to it as yet. :)
 
C

clintonG

Scott Allen said:
No Clinton, I haven't gotten around to it as yet. :)

We can do so but there's some requirements to be aware of. I don't recall
the specifics and thought I saved the page where I learned this but can't
find it anymore. Damn.

<%= Clinton Gallagher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top