I don't know if you can access helpers from controller, but I know you
shouldn't do it!

Helpers are for views, components are for controllers (and behaviors
for models)

A component + helper combo is possible, maybe your solution.

On 9 août, 11:00, Mike Green <[EMAIL PROTECTED]> wrote:
> Dear all
>
> I've come across a small problem.
>
> In my app, I'm trying to totally seperate all of the calculations and
> views into the controllers and .ctp files, which seem to be fine.
>
> However, when I am populating my table array, ready for the view, I
> want to use the cake html helper class, and it seems that I can only
> call this from the .ctp file with $html->link() function. Is there any
> way at all to be able to use this helper in the controller as then I
> can populate the links array before the view even sees it.
>
> then the view can literally just call
>
> echo $html->tableCells($mylinks);
>
> Are there any workaround? Somebody on irc suggested using
> HtmlHelper::link() but that didn't work.
>
> Open to ideas here. Please don't tell me that my view will have to
> traverse an array and populate stuff. Oh and I dont really want to
> hard code it from the controller either as at some point joomla (jake)
> will need to hook into it at some point.
>
> Thanks in advance
>
> MIke


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to