Copied to clipboard

Flag this post as spam?

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


  • Andy 4 posts 34 karma points
    Jun 07, 2013 @ 14:16
    Andy
    0

    Structure of top level content

    When creating new top level pages in Umbraco, it seems I can create pages as children of my homepage or as siblings of my homepage.  In either case the site seems to work fine and the urls of these pages are the same either way.  

    Is there a recommended way to structure a site regarding whether top level navigation items are children or siblings of the homepage?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 07, 2013 @ 19:09
    Matt Brailsford
    100

    Hi Andy,

    You can have your pages side by side, but the general best practise is to nest them below the homepage for a couple of reasons:

    1) Umbraco allows you to assign "host names" to a node so that you can actually host multiple sites from one install, this works by saying any request on a give node is routed to the node the hostname is setup on and any child page requests are filtered down to the children. By having 1 root node for a site, it allows you to do this, but if you had all your children on the root, you wouldn't be able to.

    2) Another "best practise" people tend to do, is put site-wide settings on the root / homepage node which if you nest your child pages, you can easily traverse down the content tree and access them (eg: Model.Content.AncestorOrSelf(1).GetPropertyValue("someSitewideSetting")) where as if you have them all on the root, it wouldn't be that easy.

    I'm sure there are more reasons, but I can't remember what they all are at the moment :) but I would suggest going with nested children as it will just give you more flexibility down the line.

    Hope that helps

    Matt

  • Andy 4 posts 34 karma points
    Jun 10, 2013 @ 11:43
    Andy
    0

    Hi Matt,

    Thanks for your answer - that's really helpful!

    Andy

Please Sign in or register to post replies

Write your reply to:

Draft