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.