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.

General Questions

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

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

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


Reply

3 Posts   549 Views

Avatar
Futureweb

25 August 2012 at 4:45pm Community Member, 233 Posts

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
simon_w

25 August 2012 at 5:09pm Forum Moderator, 474 Posts

Add:

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


to your Controller subclass.

Avatar
Futureweb

25 August 2012 at 5:53pm Community Member, 233 Posts

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