Copied to clipboard

Flag this post as spam?

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

  • Nick 42 posts 216 karma points
    Mar 16, 2017 @ 17:34


    Using Umbraco version 7.5.4, I've created a separate Global settings node outside of the main structure see image below, which just contains global info for the site. When I add the corresponding Umbraco field within my page templates the info doesn't render, any clue where I am going wrong. As always much appreciated in with any help. enter image description here

    Kind regards


  • Kevin Jump 1559 posts 10009 karma points MVP 3x c-trib
    Mar 16, 2017 @ 18:41
    Kevin Jump


    i would guess it because you are not finding the global settings node before you ask for the values.

    in your template you will first need to find the global settings node ?

    something like :

    var settings = Umbraco.TypedContentSingleAtXPath("\\globalSettings");
    var twitterUrl = settings.GetPropertyValue<string>("twitterUrl")

    might work . assuming your global site settings node doctype is called globalSettings

    i usually put something this in a helper class, then you can call it without doing the lookup.*


    public static class GlobalSettingsExtensions
        public static IPublishedContent GlobalSettings(this UmbracoHelper umbraco)
            return umbraco.TypedContentSingleAtXPath("\\globalSettings");

    would (when namespace is included in the razor) let you do something like:


    * error checking not included

  • Michaël Vanbrabandt 849 posts 3292 karma points c-trib
    Mar 17, 2017 @ 13:01
    Michaël Vanbrabandt

    Hi Kevin,

    nice tip about using an extension on the UmbracoHelper class for returning a root node!



  • Micha Somers 133 posts 595 karma points
    Jul 12, 2017 @ 19:51
    Micha Somers


    Thanks for this helper class.

    Needed to change a few things, but then it worked great...

    BTW ... the changes I made:

    • changed backward slashes to forward slashes => ("//globalSettings");

    • added round brackets to GlobalSettings => @Umbraco.GlobalSettings().GetPropertyValue("twitterUrl")

  • Nick 42 posts 216 karma points
    Mar 17, 2017 @ 12:56

    Thanks for your help, your solution worked great.



  • Graham Davis 68 posts 275 karma points
    Aug 14, 2017 @ 17:00
    Graham Davis

    Thanks for posting this. I need to the same thing!

Please Sign in or register to post replies

Write your reply to: