[dokuwiki] Re: how to add dynamic css from a plugin ?

  • From: Michael Klier <chi@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 19 Mar 2008 17:23:47 +0100

Stéphane Gully wrote:
> Hello,

Hi,

> I'm developing a dw plugin which need to insert some extra css/js in
> the page header.
> I cannot use style.css or script.js because the generated css/js are
> dynamic (depends on the plugin parameters).
> My question is simple : is it possible to include extra css or js in
> the <head> tag ?

Yes. You can do this with an action plugin, the event you need to intercept is
ACTION_HEADERS_SEND [1]. There you can add your own extra css/js to the meta
headers.

HTH,
    Chi

[1] http://wiki.splitbrain.org/wiki:events_list#action_headers_send

-- 
Michael Klier

www:    http://www.chimeric.de
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: