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.

Customising the CMS /

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

Director addRules and extra params

Go to End

3 Posts   3000 Views


Community Member, 271 Posts

12 May 2010 at 7:00am

How should I construct Director:addRules(); like :

Director::addRules(10, array(
	'/$Action/$ID/$OtherID/$Region/$Country/$City' => 'SearchPage_Controller',

So I can use (also with nested urls enabled):{$someURLSegment}/{$someAction}/id/otherid/region/country/city/

When I add the above rules I get the error:

[User Warning] popCurrent called on ModelAsController controller, but it wasn't at the top of the stack


Community Member, 72 Posts

17 August 2011 at 5:03pm

I realize this is an old post, but were you able to figure this out?

I have a similar set up, where I want to have
it could go one or two more deeper, but I'm just trying to get the $ItemID part figured out.

I get the same error as you did, and I've tried:

Director::addRules(100, array(
	'$Controller//$Action/$ID/$OtherID/$ItemID' => '*'

Director::addRules(100, array(
	'/$Action/$ID/$OtherID/$ItemID' => 'MyPage_Controller'


Community Member, 62 Posts

25 October 2011 at 10:40am

Edited: 25/10/2011 10:42am

Do any of the ideas at answer your question?