if ($this->params['controller'] == 'controller') {
// css functions
}
On Jun 24, 12:01 pm, Shmuel <shmue...@gmail.com> wrote:
> HI,
>
> I have a controller similar to Pages where I want to load CSS
> that would be loaded for all the pages.
> This is the code how I'm doing it:
>
> App::import('Helper', 'Html');
> $html = new HtmlHelper();
> $html->css('cssfile', null, null, false);
>
> If I put this code to display() or beforeFilter(), or beforeRender()
> I get a error that addScript() called on null object.
> Seems to me that $view is not constructed yet.
>
> If I put it to afterFilter() nothings happens.
>
> So, what can I do?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment