I'm pretty sure you can do this in your controller action:
$this->helpers[] = 'asset';

The helper will be added to the helpers already set up for the
controller.

-Matt
http://www.pseudocoder.com/


On Jan 16, 11:52 am, Abhimanyu Grover <[email protected]> wrote:
> Hey all,
>
> Our CakePHP CMS is growing in size and some of the controllers load as
> much as 19-20 helpers each, even when all of them are not required.
> There are few controller actions which require max of 6-7 helpers at
> max. So in order to make CMS more fast, I was thinking it'll be better
> to load helpers only when needed.
>
> I know App::import() what'll be better?
>
> 1. To import helper in controller action like this:
> App::import('Helper', 'AssetsHelper');
> $assets = new AssetsHelper();
> $this->set('asset', $asset);
>
> or
>
> 2. Loading helper like above in the view itself.
>
> Please suggest. Thanks a lot.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to