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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

SS3 - adding another param to url $Params['AntherID']


Go to End


3 Posts   1045 Views

Avatar
JonShutt

Community Member, 244 Posts

25 August 2012 at 4:45pm

Hi,

I've got a new SS3 site, which has a set up this this

mysite.com/listings/show/New Zealand/Wellington/12332

eg: page / action / id / otherid / anotherid

I've tried numerous ways of adding another id to the end of the url, but it's all failing - either with page not found or other errors.

Does any one know a way of doing this?

Cheers

Jon

Avatar
(deleted)

Community Member, 473 Posts

25 August 2012 at 5:09pm

Add:

public static $url_handlers = array(
		'$Action//$ID/$OtherID/$AnotherID' => 'handleAction',
	);

to your Controller subclass.

Avatar
JonShutt

Community Member, 244 Posts

25 August 2012 at 5:53pm

Thanks for that - I was trying similar things, but mustn't have been quite right.
work now -- many thanks!