Copied to clipboard

Flag this post as spam?

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

  • Martin 278 posts 661 karma points
    Aug 13, 2018 @ 13:31

    Multisite - Root Home Node

    Hi All,

    I'm at the beginning of building a multi-site structure in Umbraco Cloud.

    I've ran into the problem of setting the root node of each multi-site, where my navigation is going to the root of the Umbraco instance and not the "Home" node of each site.

    • Brand One
      • Home - hostname -
        • About
    • Brand Two
      • Home - hostname -
        • About

    I want to be able to set the root node of the site on the home page. Is there a best practice to set the root to the home node?

        var site = Model.Content.Site();
        <li><a href="@site.Url">@site.Name</a></li>
        @foreach(var node in site.Children) 
            <li><a href="@node.Url">@node.Name</a></li>



  • Dave Woestenborghs 3413 posts 11555 karma points MVP 6x admin c-trib
    Aug 13, 2018 @ 13:49
    Dave Woestenborghs

    Hi martin,

    What you can do is the following

    var site = Model.Content.AncestorOrSelf("homePageDocTypeAlias")

    You will need to replace homePageDocTypeAlias with the actual alias of your homepage doctype.


Please Sign in or register to post replies

Write your reply to: