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

Custom URL Structure: redirect parent, but not children

Go to End

4 Posts   2564 Views


Community Member, 2 Posts

26 September 2010 at 11:52pm

Edited: 26/09/2010 11:53pm

Hi there,

i'm pretty new to SilverStripe and need some help with custom URLs.

I have the following structure:


now i'd like to create the following "behaviour":

1: if the user tries to visit "section2" directly ("") and no specific page,I
he should see "section1" ("").

2: otherwise - if he calls a specific page of "section2" ("") - there should be no redirect and he gets to the page

What am i looking for?

1. Some conceptual help: What would you use to create such behaviour and why: A custom controller class? a rule in _config ? Some function in the section2_controller class?

2. Some practical help: I'd be glad to get a code snippet from you, since php coding is not my main skill.



Community Member, 4 Posts

12 October 2010 at 8:24pm


Community Member, 244 Posts

12 October 2010 at 8:58pm

There's no need to implement any custom controller code for this - just set up the parent Section 1 page as a RedirectorPage which redirects users to Section 2, and then add children like normal under it.


Community Member, 2 Posts

13 October 2010 at 8:47am

Thanks for your help.

@Yasen : indeed there are some useful information for me!

@ajshort well, in my case "section2" is "blogHolder-page" - so i cant change it to type "redirector-page"