Copied to clipboard

Flag this post as spam?

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


  • Arie 224 posts 675 karma points
    Mar 09, 2014 @ 11:42
    Arie
    0

    Sibling of root node in Umbraco 6.2.0 (beta)

    Up to version 6.1.6 I was able to get to the Content node and back down with this statement:

    @Model.NodeById(-1).Descendants("Legal").First().siteCopyrightStatement
    

    However, that doesn't seem to work in 6.2.0. The site-wide configs are stored as children of a sibling of the root, like this:

    + Content |
              + Site Root |
                          + Page Nodes
              + Site Configs |
                             + Config Nodes
    

    Any idea how I can get to them now?

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Mar 09, 2014 @ 13:40
    Sebastiaan Janssen
    0

    Can you please report this as an issue in the tracker? Sounds like it needs to be fixed before release.

  • Arie 224 posts 675 karma points
    Mar 10, 2014 @ 17:15
    Arie
    0

    It appears that the routine doesn't walk up the tree high enough. For instance:

    @Library.NodeById(-1).Id
    

    Returns "0" instead of "-1".

    My hunch is that the exception with @Model is related to this.

    I've logged two issues:

    http://issues.umbraco.org/issue/U4-4373

    http://issues.umbraco.org/issue/U4-4374

  • Charles Afford 1163 posts 1709 karma points
    Mar 10, 2014 @ 22:56
    Charles Afford
    0

    Yea i had the same thing.  What i did is get to level 1 and then got siblings by doc type alias.  Dont know if that helps.  Other than that we have used an xpath expression to get to the root (not a fan of this approach) much prefered the (-1)

  • 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