Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kurisotofa 27 posts 75 karma points
    Mar 28, 2009 @ 14:11
    Kurisotofa
    0

    Content Tree w. subfolders

    Basically I wanted to create a navigation menu with webpages divided into subfolders.

    So I first created my content tree like this :

    Content
    -Website
    -- Home
    -- Credits
    -- Links
    -- Login
    -Band
    -- Band News
    -- Biography
    -- Members
    -Music
    -- ...

    Etcetera, etcetera, I guess you get the picture.

    I didn't use a root folder, because I wanted my links to be :
    - \home.aspx
    - \credits.aspx
    - ...

    If I would've used a root folder, they would have been :
    - \website\home.aspx
    - \band\biography.aspx


    Now I want to create an XLST navigation menu with level 1 elements "Website", "Band", "Music",... and level 2 elements "Home", "Credits", "Links",... but I can't figure out a way to call my level 1 elements.

    If I use

  • Kurisotofa 27 posts 75 karma points
    Mar 28, 2009 @ 14:16
    Kurisotofa
    0

    Forgot to mention this :

    I wouldn't mind using a root folder, if someone could show me how I could strip the subfolder name from the URL.

    E.g. my content tree :

    Content
    -Root
    -- Website
    --- Home
    --- Links
    -- Band
    --- Band News
    ...

    should result in :

    - {domain}/home.aspx
    - {domain}/links.aspx
    - {domain}/band-news.aspx
    - ...

    instead of :

    - {domain}/website/home.aspx
    - {domain}/website/links.aspx
    - {domain}/band/band-newsaspx

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Mar 28, 2009 @ 20:06
    Casey Neehouse
    0

    node[@level=0] does not exist.. it is root.

    $currentPage/ancestor::root/node

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Mar 28, 2009 @ 20:10
    Casey Neehouse
    0

    RE: stripping the level1 nodes, there is a setting in the web.config to do so. Umbraco generates urls for both the level 1 and level 2 nodes as if they are at the same level. Be careful though, as duplicate level 2 nodes across all trees will result in the first match being shown -- IE website/news and band/news would have the same url of /news.aspx - website/news would show.

  • Kurisotofa 27 posts 75 karma points
    Mar 30, 2009 @ 23:19
    Kurisotofa
    0

    Great! The "ancestor::root"-method works perfectly!
    Many thanks...

  • seopositive2 3 posts 20 karma points
    May 23, 2009 @ 08:48
    seopositive2
    0

    I also follow your post because i also search same thing that your are making thanks for this.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies