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?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
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?
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()
not sure which was is recommended, but i've been using
$Params = $this->getURLParams();
which gives:
$Params['Action']
$Params['ID']
$Params['OtherID']
No, $Params = $this->getURLParams(); cannot be used.
Error: Call to undefined method CompactNavigator::getULRParams()