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:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Editable global data through specific pages

Go to End

4 Posts   996 Views


Community Member, 17 Posts

3 March 2010 at 3:48am


I was trying to develop one part of the code but with no luck of finding the best way to do it.

So, I have 4 pages (Home, About Us, Services, Contact Us). I want to be able to access same data on About Us, Services and Contact Us, but not in Home, while also accessing specific data to each page template.

Imagine this, theres' diffent data shown on each page, but it keeps same company message. I could easily do it right in the template, but I also need it to be editable in CMS. Any ideas how can I do it?

Thank You


Community Member, 541 Posts

3 March 2010 at 5:37am

If you are using the 2.4 beta release, you can create global properties by extending the SiteConfig class. If you are on 2.3 however, maybe a widget would be more useful?



Forum Moderator, 5523 Posts

3 March 2010 at 9:38am

Yea +1 what Mo said - thats what the SiteConfig panel in 2.4 was developed for. Trying to find a link on the wiki for it but doesn't look like its been documented yet.

In 2.3 what I normally do for global data is make a field on the homepage page type then in the template use <% control Page(home) %>$GlobalMessage<% end_control %>. Reason I do it on the homepage is usually there a) is one and b) its singlar so 1 place to edit the data. Not perfect so hence why SiteConfig is here in 2.4!


Community Member, 541 Posts

3 March 2010 at 1:34pm

All the stuff I know about SiteConfig I found out by reading inline docs and forum posts... I didn't know any other 2.4 docs existed :).

Also, I pretty much do the same in 2.3. I usually have a HomePage class that expands Page, I tend to use pretty much the same code in my template as Willr.