Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

SiteTitle and Tagline in templates

Go to End

20 Posts   10215 Views


Community Member, 102 Posts

9 April 2010 at 8:45pm


i have tested you code below and it works fine.
i was just wondering in what circumstances can you use it when its under SiteConfig.




Community Member, 203 Posts

9 April 2010 at 9:59pm

I am not sure what you are asking.

I use it when working with a css menu with image replacement, so you can say: that page corresponds with that position in the menu. There are also other ways to do that, for instance create a page-class where the name corresponds with the the css class or id in the menu and later on gives the body class etc.

Or do you mean: how to get the info out of there?

To get the link to the pages it works like this:
You store the id in $SiteConfig.PortfolioID, but to get the link in your templates you use $SiteConfig.Portfolio.Link

BTW: in php you get access to the data with DataObject::get_one('SiteConfig', '');


Community Member, 102 Posts

9 April 2010 at 10:27pm


well said in a nutshell. thank you very much for sharing appreciate that

ta PAt


Community Member, 102 Posts

2 September 2010 at 11:31pm

Edited: 02/09/2010 11:32pm

Nice, thanks. Perfect for the Google Analytics account number. Also, if there are a lot of contact forms on a site, SiteConfig would be good for the From & To email addresses. Also header & footer stuff like phone/address...

Think I'll be including this in all my SilverStripe sites from now on...

jeremykiveo: Would be nice to change updateEditFormFields to updateCMSFields in your blog post.

Go to Top