Calling block action with arguments

Permalink
Hi.

Does anyone know how to call a block controller action with arguments?

Using '$this->action('myFunction')' calls the controller function 'action_myFunction(){}'. But I need to transfer arguments to the function. Doing '$this->action('myFunction','argument')' simply ads 'argument' to the end of the generated url.

Any suggestions?

/H

 
mnakalay replied on at Permalink Reply
mnakalay
in your controller the action doesn't need to be called action_myFunction, just myFunction.

In the controller it needs to be:
public function myFunction($argument) {
}

the argument added to the url is passed on to the function.

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.