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?
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.
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.
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.
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
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
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
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="<meta name="description" content="" insertTextAfter=""/>" 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
Thanks a mill.
Umbraco is a new world for me.
is working on a reply...
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.