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.

Customising the CMS /

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

Using URL Parameter


Go to End


1262 Views

Avatar
freakout

Community Member, 49 Posts

19 March 2013 at 2:44am

i try to use a Part of the URL in the controller.
i have set up a new page-type and new controller.
i have set up a corresponding page -> everything is fine.
now i want to use something like http://domain/pagename/parameter
i added: Director::addRules(200, array('monatsbilder/$Month' => 'Monat_Controller'));
to my mysite/_config.php
my controller is called when i access the url with the parameter
but the "control Menu(1)" within the template looses all the Menu hierarchy.
it seems i loose the information on which page i am.
i must be missing something basic but i cannot figure that out. Please help.
This is SilverStripe 2.4!