Hi,
Line 28 of RedirectorPage.php in SS3 :
static $allowed_children = array();
I've been able to change this behaviour by using a custom class.
But out of curiousity : why isn't adding children to a redirector page allowed by default ?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
Hi,
Line 28 of RedirectorPage.php in SS3 :
static $allowed_children = array();
I've been able to change this behaviour by using a custom class.
But out of curiousity : why isn't adding children to a redirector page allowed by default ?
Likely someone figured no one would even need to create children of redirectors! I'd say removing it won't break anything and keeps the behaviour more consistent.
Thanks for your answer Will.
Let's consider this kind of site tree :
Page 1 (level 1)
Page 2 (level 1)
-------Page3 (level 2)
-------Page 4 (level 2)
-------Page 5 (level 2)
Page 6 (level 1)
I want Page 3 to be displayed when somebody clicks on "Page 2" in the top-level menu.
Do you mean that redirecting Page 2 to Page 3 is the wrong way to achieve this ?
Stan
Do you mean that redirecting Page 2 to Page 3 is the wrong way to achieve this ?
No, I said it's the right way to do it and that whoever changed it was wrong. Submit the fix as a pull request (you can edit the file directly through github if learning git is too hard).
Thanks, and sorry for my misunderstanding.