Copied to clipboard

Flag this post as spam?

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


  • Hardy Wang 91 posts 112 karma points
    Feb 10, 2012 @ 18:45
    Hardy Wang
    0

    Multiple Nodes with Same Name

    Hi all,

    Let's say my web site has following structure

    - Root 1
    ---- SubNode1
    - Root 2
    ---- SubNode1

    There is no way to tell the difference between SubNode1 under Root 1 and Root 2. What is the best practice to deal with same node names?

    Is is possible I can configure Umbraco when I want to load SubNode1, I actually can use full path like http://myserver/Root 1/SubNode1.aspx?

    Another question is that every node in Umbraco is a page, is there a way I can create physical folder to separate them?

  • Mike Chambers 635 posts 1252 karma points c-trib
    Feb 10, 2012 @ 20:22
    Mike Chambers
    0

    There's a setting in the web.config file... [http://our.umbraco.org/wiki/reference/webconfig]

    The option you want is umbracoHideTopLevelNodeFromPath then republish your entire site for the change to reflect in the urls (both in the properties tab and calls to niceURL)

    As the front end is actually consgtructed from a static xml file (see the app_data umbraco.config file) there is no physical file strucutre at all representing nodes/pages on your site.

    Our apporach for these nodes that don't actually contain content is to have a "cascade to child" true/false parameter. Then for xlst you can include logic to fetch the url for the child item when refering to the "Folder" item. You also need a usercontrol macro to redirect any direct requests to the page to cascade down, I couldn't find a method in the umbraco.library that performs redirects (prob a 301 permanent redirect)...so we created a simple usercontrol macro to do this.

    there is a forum discussion here [http://our.umbraco.org/forum/developers/xslt/2834-Redirect-to-first-child-node-in-xslt] that touches on some of this. 

  • Hardy Wang 91 posts 112 karma points
    Feb 10, 2012 @ 21:40
    Hardy Wang
    0

    Great umbracoHideTopLevelNodeFromPath='false" in web.config does the trick for me.

    Thanks for the help.

Please Sign in or register to post replies

Write your reply to:

Draft