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 <cakephpi...@gmail.com> 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 <cakephpi...@gmail.com>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 cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to