Make a Lasting Impression





define zone for loading CSS and Javascript
Home away from home
Joined:
2009/3/3 4:18
From Belgium
Posts: 1952
I'm trying to add CSS and JS files to my site via a preload. To do this, I'm calling

$icmsTheme
->addStylesheet('stylesheet0.css','','','css_header',0);
in the eventBeforeFooter() function. I expect the inclusion of the stylesheet to happen where I define $css_header in my theme.

My theme defines

<{$css_header}>

just before the closing of the head tag.

When I look at the page, nothing is added at the location of the css_header tag in my theme.
Do I define the zone correctly in my theme, or is the eventBeforeFooter function not a good place?

Posted on: 3/24 9:50:28
_________________
d-log - My personal site
Openhub profile
Transfer the post to other applications Transfer


Re: define zone for loading CSS and Javascript
Home away from home
Joined:
2007/12/4 9:00
Posts: 4242
When I've defined preloads that adds something to the page, I've used the eventStartOutputInit trigger. The core events are documented in core events wiki page. The sequence of events can be visualized using the visual preload plugin

Posted on: 3/25 2:08:11
_________________
Steve
Twitter: @skenow
Facebook: Steve Kenow
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]