Maybe you are mixing requestAction with passing parameters to an
element.
Try $this->requestAction('controller_name/count/5');
Look at the API entry for requestAction:
http://api.cakephp.org/class/object#method-ObjectrequestAction
On Mar 25, 11:32 pm, Fran Iglesias <[email protected]> wrote:
> Hi,
>
> I have a doubt with requestAction and passing parameters to the
> action. The cookbook doesn't state it clear enough for me.
>
> If you have a controller action like this:
>
> function recent($count = null) {...}
>
> and you call it using requestAction with a parameter...
>
> $this->requestAction(array('action' => 'recent', 5));
>
> then you don't get 5 in the $count variable in the action. You can
> find in $this->params[0].
>
> Is this the expected behavior?
>
> TIA
> ---
> Fran Iglesias <[email protected]>http://cakephpilia.blogspot.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---