By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,399 Members | 1,591 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,399 IT Pros & Developers. It's quick & easy.

Leaf Node in SiteMapPath

P: n/a
Hi Gang,

I have a SiteMapPath, bound to a Site Map, that traces a hierarchy down to
an 'Article' leaf node. But the Article page shows one of many individual
articles depending on which article the user chooses in the Articles page.
The way it is set up now, if the user selects a particular article in the
'Articles' page, the SiteMap looks like this: '. . . Articles Article'.
Assuming the user choses a cookie baking article, I would like it to read
like this: '. . . Articles How to Bake Chocolate Chip Cookies'. In other
words, I am trying to make the leaf node of the SiteMapPath show the name of
the article. I know there's a way because all the sites do this but I can't
find it.

And I have another one which is related: how do you hide the 'Article' node
in a menu which is bound to the same Site Map as the above SiteMapPath? I
can disable it but I just don't want it to appear at all.

Thanks for any ideas.

Steve
Sep 15 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
One solution might be to could vary your site map nodes by querystring
parameters. Another solution might be to use the Context.RewritePath method
to make it appear that your "Chocolate Chip Cookies" page has a unique URL
when in reality (behind the scenes) it shares a URL with many other "pages".
Here's more info:
http://windowssdk.msdn.microsoft.com.../sa5wkk6d.aspx

As for your second question, the SiteMapDataSource has some properties that
should be able to help you such as ShowStartingNode, StartFromCurrentNode,
StartingNodeOffset, and StartingNodeUrl. Depending on the specifics of your
needs, I imagine one or more of these properties will help you out.
Here's more info:
http://SteveOrr.net/articles/SiteMaps.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Uriah Piddle" <st*************@msn.comwrote in message
news:ek****************@TK2MSFTNGP02.phx.gbl...
Hi Gang,

I have a SiteMapPath, bound to a Site Map, that traces a hierarchy down to
an 'Article' leaf node. But the Article page shows one of many individual
articles depending on which article the user chooses in the Articles page.
The way it is set up now, if the user selects a particular article in the
'Articles' page, the SiteMap looks like this: '. . . Articles Article'.
Assuming the user choses a cookie baking article, I would like it to read
like this: '. . . Articles How to Bake Chocolate Chip Cookies'. In other
words, I am trying to make the leaf node of the SiteMapPath show the name
of the article. I know there's a way because all the sites do this but I
can't find it.

And I have another one which is related: how do you hide the 'Article'
node in a menu which is bound to the same Site Map as the above
SiteMapPath? I can disable it but I just don't want it to appear at all.

Thanks for any ideas.

Steve

Sep 15 '06 #2

P: n/a
TITLE shows up on the menu. Description shows up on SiteMapPath. Set both
and you should be fine.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Uriah Piddle" <st*************@msn.comwrote in message
news:ek****************@TK2MSFTNGP02.phx.gbl...
Hi Gang,

I have a SiteMapPath, bound to a Site Map, that traces a hierarchy down to
an 'Article' leaf node. But the Article page shows one of many individual
articles depending on which article the user chooses in the Articles page.
The way it is set up now, if the user selects a particular article in the
'Articles' page, the SiteMap looks like this: '. . . Articles Article'.
Assuming the user choses a cookie baking article, I would like it to read
like this: '. . . Articles How to Bake Chocolate Chip Cookies'. In other
words, I am trying to make the leaf node of the SiteMapPath show the name
of the article. I know there's a way because all the sites do this but I
can't find it.

And I have another one which is related: how do you hide the 'Article'
node in a menu which is bound to the same Site Map as the above
SiteMapPath? I can disable it but I just don't want it to appear at all.

Thanks for any ideas.

Steve

Sep 16 '06 #3

P: n/a
Thanks Steve and Gregory,

On the sitemappath issue, I am passing the title in the query string and
coding based on this article that I found and it works well. The author does
not put the page that shows the data in question in the SiteMap but instead
creates a sitemappath node and appends it to the root node which looses all
the ancestor nodes. I included that page in the SiteMap and just changed the
title of the current node in the event handler he discusses.

The article: http://msdn.microsoft.com/msdnmag/is...06/WickedCode/

Still working on the menu.

Steve

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:uW**************@TK2MSFTNGP04.phx.gbl...
TITLE shows up on the menu. Description shows up on SiteMapPath. Set both
and you should be fine.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Uriah Piddle" <st*************@msn.comwrote in message
news:ek****************@TK2MSFTNGP02.phx.gbl...
>Hi Gang,

I have a SiteMapPath, bound to a Site Map, that traces a hierarchy down
to an 'Article' leaf node. But the Article page shows one of many
individual articles depending on which article the user chooses in the
Articles page. The way it is set up now, if the user selects a particular
article in the 'Articles' page, the SiteMap looks like this: '. . .
Articles Article'. Assuming the user choses a cookie baking article, I
would like it to read like this: '. . . Articles How to Bake Chocolate
Chip Cookies'. In other words, I am trying to make the leaf node of the
SiteMapPath show the name of the article. I know there's a way because
all the sites do this but I can't find it.

And I have another one which is related: how do you hide the 'Article'
node in a menu which is bound to the same Site Map as the above
SiteMapPath? I can disable it but I just don't want it to appear at all.

Thanks for any ideas.

Steve


Sep 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.