Copied to clipboard

Flag this post as spam?

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


  • Sebastian Patten 10 posts 40 karma points
    Dec 12, 2009 @ 00:57
    Sebastian Patten
    0

    Nesting a URL

    Hi there - I've created a logical tree structure for my site - how do I make the URL reflect that of my hierarchy.

    E.g. I was expecting

    Home
       + Hello World

    To yield the following URL:

    http://localhost/Home/Hello-World.aspx

    but it gives me:

    http://localhost/Hello-World.aspx

     

    What do I change?

     

    Thanks!

  • Lee 1130 posts 3088 karma points
    Dec 12, 2009 @ 01:04
    Lee
    0

    Home is usually the root of your website - So you would expect to see a url of just hello-world.aspx? Why do you want the URL with Home in it?

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Dec 13, 2009 @ 13:38
    Douglas Robar
    1

    By default, umbraco hides the top-level node from the URL since it generally adds unhelpful extra items to the url.

    Here's how a content section is typically structured and the associated urls umbraco creates by default:

    CONTENT
    + Home (url = /home.aspx as well as /)
    + Products (url = /products.aspx)
    - Widget A (url = /products/widget-a.aspx)
    - Widget B (url = /products/widget-b.aspx)
    - Contact Us (url = /contact-us.aspx)
    - About Us (url = /about-us.aspx)

    But if you want to include the 'home' node in the url of all its subpages... just change the following line in the web.config file.

    <add key="umbracoHideTopLevelNodeFromPath" value="false" />

    You'll then need to publish the home page and all it's children for umbraco to recalculate the urls. Just right-click on the home page and select the 'Publish' menu. Be sure to click the 'publish child nodes' option as well.

    cheers,
    doug.

  • Sebastian Patten 10 posts 40 karma points
    Dec 14, 2009 @ 16:27
    Sebastian Patten
    0

    Great stuff - thanks guys. I found your reply particularly useful Douglas, well explained.

    BTW - I used to live in Cambridge - miss the place :( 

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 14, 2009 @ 16:43
    Dirk De Grave
    0

    You should mark Doug's solution as the answer, so people struggling with same issue may use this as a reference.

     

    Cheers,

    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft