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:

Customising the CMS /

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

How do I go about adding groups to the Site Tree to group specific page types?

Go to End

2 Posts   1169 Views


Community Member, 14 Posts

24 July 2009 at 9:42am

I would like to customize the site tree - I want to be able to group specific page types, without affecting the menu hierarchy. I thought about adding a page holder, but that page holder would show up in the menu. If I then uncheck "Show in menus", the sub-pages won't show up in the menu either.

Essentially what I'm trying to do here is allow a convenient way to edit two different "versions" of the site. We target multiple locations with our website, and depending on the location, the content needs to be slightly different. It would be ideal if I could somehow group specific page types to make it easy to edit content from a specific location without having multiple pages with the same names grouped together.

At the very least, I could distinguish between page types in the tree view by showing a different icon, depending on the page type.

If anyone could help me solve this problem, it would be greatly appreciated.


Community Member, 57 Posts

4 August 2009 at 10:30am

Well there are three ways you could do it:

1. Use the multi-language features in Silverstripe to create a 'bilingual' website, even if it just means the content is slightly different.

2. Say you had three 'different' versions of the site. You could have three top level pages in the hierarchy and under that have your different pages. In the page controller you could find what version of the site the user is viewing (from domain, session or cookie - whatever) and show them that menu structure.

3. You could relate an object for TypeOfPage to each Page and in the site only show the pages which are related to this type.

I am not sure which is better for your needs and it depends if you want what is cleanest or what is easiest for the admin or front-end user.