Reputation: 468
I am working in TYPO3 .....
how can i get arguments from URL
i passed arguments in url like this ,
as a template in resources folder , file name : list.html
<f:form action="update" object="{hotel}" arguments="{myArgument: argumentname}" name="hotel">
and in controller in updateAction() , i want to fetch that agruments , so i write like this ,
$this->view->assign('hotel', array('test' => 'hello' . isset($this->arguments['myArgument']) .'@@' . $this->getParametersSafely('myArgument')));
and i make the function in controller...
public function getParametersSafely ($parameterName) {
if ($this-> request-> hasArgument ($parameterName)) {
return $this-> request->getArgument($parameterName);
}
}
So please help me this is not working
Upvotes: 0
Views: 1712
Reputation: 7036
I guess "this is not working" means the string in the fluid variable {hotel}
is kind of not what you expect? Or what exactly is not working?
First of all isset()
returns a boolean, that you should not just add to your string.
Secondly, if you use arguments="{myArgument: argumentname}"
fluid expects argumentname to be a variable passed to the template. If you want to pass a string, you need to specify it: arguments="{myArgument: 'argumentname'}"
.
Upvotes: 0