Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Controller Help

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

Page: 1
Go to End
Author Topic: 919 Views
  • eceers
    Avatar
    Community Member
    24 Posts

    Controller Help Link to this post

    I have written a little controller to return a Object from passed id. All works A OK! with one exception.

    If the url is submitted like this http//www.example.com/processattendees/send/50000004527-49230 all is ok.

    The problem is that if the url is submitted like http//www.example.com/processattendees/send/50000004527/49230 it breaks the controller.

    I'm assuming that the controller is getting lost because of the extra forward slash. Is there anything I can do in the controller to stop the extra slash breaking things?

    Any help or pointers would be greatly apreciated.

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Controller Help Link to this post

    http://doc.silverstripe.org/sapphire/en/topics/controller#url-handling

    The extra slash is making the controller think there's another step in the URL. You might need to tweak your url handling.

    919 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.