Jump to:

22997 Posts in 11853 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » SS 3.01 Director::urlParam

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: 616 Views
  • Pike
    Avatar
    Community Member
    40 Posts

    SS 3.01 Director::urlParam Link to this post

    Hi,

    from SS verzion 3.0 this is deprecated:
    $action = Director::urlParam( 'Action' );

    How can I can get param when I want it from module?

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: SS 3.01 Director::urlParam Link to this post

    From the controller you can use $this->getAction(). If you want the action name from outside the controller you first have to get the current controller:

    $curr = Controller::curr();
    $curr->getAction()

  • Futureweb
    Avatar
    Community Member
    232 Posts

    Re: SS 3.01 Director::urlParam Link to this post

    not sure which was is recommended, but i've been using

    $Params = $this->getURLParams();

    which gives:

    $Params['Action']
    $Params['ID']
    $Params['OtherID']

  • Pike
    Avatar
    Community Member
    40 Posts

    Re: SS 3.01 Director::urlParam Link to this post

    No, $Params = $this->getURLParams(); cannot be used.
    Error: Call to undefined method CompactNavigator::getULRParams()

    616 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.