Copied to clipboard

Flag this post as spam?

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


  • Jens Hummelmose 6 posts 26 karma points
    Dec 06, 2009 @ 21:49
    Jens Hummelmose
    0

    Is there a way to create site settings.

    Hi there.

    I'm converting quite a big site theese days to Umbraco. I'm trying to make a "Site Settings" section, where I can put the Site Background Image, Site logo etc.

    I tried with a masterpage, with a documenttype + template associated, but it seems that when I then click on a sub page it looses its values.

    Is it anyway possible to make som global settings, which can reffered on all pages nomater what master it's running on?

    /Jens

  • Chad Rosenthal 272 posts 474 karma points
    Dec 06, 2009 @ 22:14
    Chad Rosenthal
    2

    So you may be able to modify the following code (from the Creative Website Starter Kit):

    <xsl:value-of select="$currentPage/ancestor-or-self::node [@level=1]/data [@alias='siteName']"/>

    Basically, you'd have all of the site settings in the home page document type. When you create the home page, you would then enter in your site settings including uploading background images, etc. In XSLT, you could then use the code above to add that into any XSLT and in turn any template on the site. Just change alias='siteName' to the alias that you are trying to display.

    -Chad 

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Dec 06, 2009 @ 22:24
    Jan Skovgaard
    0

    I Agree with Chad that you could place some of the settings on your "home page" document type.

    If you have the need to make some site settings that would be to cumbersome to have on your "home page" document type you could create a "Settings" document type, under which you can allow a hierachy of document types that would make sense in your context.

    In your content tree I would create the "Settings" part of the page at the same level as the homepage node.

    You can then control your settings from here and reference them on your content document types.

    Off course this would be overkill if it's just some simple settings like logo and background images you need to put somewhere.

    /Jan

  • Paul Blair 466 posts 731 karma points
    Dec 06, 2009 @ 23:09
    Paul Blair
    2

    You can also try using the [recursive="true"] option. For example, on my master template I would have the following itme.

            <umbraco:Item ID="Item2" field="Description" insertTextBefore="&lt;meta name=&quot;description&quot; content=&quot;" insertTextAfter="&quot;/&gt;" recursive="true" runat="server"></umbraco:Item>

    As long as a value has been set for Description on the home page, it will filter down to all sub pages. Furthermore, I can override it on a sub page when required.

    This would be useful if you wanted some sub-apges to have a different sub-background image.

    Cheers

    Paul

  • Jens Hummelmose 6 posts 26 karma points
    Dec 07, 2009 @ 17:35
    Jens Hummelmose
    0

    Thanks a mill.

    Umbraco is a new world for me.

  • 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