Leaf Node in SiteMapPath

Discussion in 'ASP .Net' started by Uriah Piddle, Sep 15, 2006.

  1. Uriah Piddle

    Uriah Piddle Guest

    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
    Uriah Piddle, Sep 15, 2006
    #1
    1. Advertising

  2. 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/en-us/library/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" <> wrote in message
    news:ek8R%...
    > 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
    >
    Steve C. Orr [MVP, MCSD], Sep 15, 2006
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:ek8R%...
    > 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
    >
    Cowboy \(Gregory A. Beamer\), Sep 16, 2006
    #3
  4. Uriah Piddle

    Uriah Piddle Guest

    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/issues/06/06/WickedCode/

    Still working on the menu.

    Steve

    "Cowboy (Gregory A. Beamer)" <> wrote in
    message news:...
    > 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" <> wrote in message
    > news:ek8R%...
    >> 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
    >>

    >
    >
    Uriah Piddle, Sep 17, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,447
  2. Alexandre Jaquet

    [JTree] Adding a leaf to a node

    Alexandre Jaquet, Nov 8, 2003, in forum: Java
    Replies:
    0
    Views:
    612
    Alexandre Jaquet
    Nov 8, 2003
  3. Alexandre Jaquet

    [JTree] click on a node or a leaf

    Alexandre Jaquet, Nov 10, 2003, in forum: Java
    Replies:
    2
    Views:
    4,593
    Matthew Zimmer
    Nov 11, 2003
  4. mazdotnet
    Replies:
    1
    Views:
    7,624
    mazdotnet
    Aug 1, 2006
  5. Replies:
    4
    Views:
    521
Loading...

Share This Page