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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

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

site wide settings


Go to End


5 Posts   2095 Views

Avatar
Nicolaas

Forum Moderator, 224 Posts

10 June 2008 at 12:36pm

Hi Gurus

I am keen to get some input and ideas from y'all. On my SS sites I would like the user to set some settings that apply to the whole site rather than just a specific page. Examples include:

1. text for footer shown on every page
2. selecting a page for a certain function (e.g. page of the month)
3. select the page that is linked two when people click on the "products" button
etc...

So far, I have used the following solutions:
1. add fields to the homepage
2. add fields to every standard page
3. use the _config.php file and tell my client it can not be changed.

None of these are particularly perfect. The best place to put it would actually be under "Site Content" at the top of the sitetree in the CMS.

Would love to hear your ideas on this.

Thanks in advance

Nicolaas

Avatar
Willr

Forum Moderator, 5523 Posts

10 June 2008 at 1:44pm

I have tended to add options to Page (so everypage) but with a set of defaults so 90% of the time they dont need to change the options. And if this is on Page they can override options on a page by page option. But for site wide settings doing it on the homepage is probably the next most easiest thing

Avatar
Nicolaas

Forum Moderator, 224 Posts

12 June 2008 at 1:17pm

Hi Will

I think it would be even better if we had a more dedicated place for this as the homepage may have its own set of fields making it confusing.

Is there anyway you can create items on the sitetree that are not actually pages as such?

Avatar
Willr

Forum Moderator, 5523 Posts

12 June 2008 at 1:58pm

Not currently sadly, only way would just to to make a SiteConfig page type with all the fields etc, and extend it off a redirector page? rather then a page. So it would still be a page in the site tree and have a url like /site-config/ but if a user hit it on the front end it would redirect them to the homepage or something. You could also hide it from search and menus so Its 'Invisible' in a sense

Avatar
Nicolaas

Forum Moderator, 224 Posts

12 June 2008 at 2:02pm

Cool idea! THANKS