[dokuwiki] Re: how to add dynamic css from a plugin ?
- From: "Stéphane Gully" <stephane.gully@xxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Thu, 20 Mar 2008 17:19:35 +0100
> - render important information for your JS/CSS using the metadata
> renderer not xhtml renderer. Its now stored in the page's metadata
> where its accessible before just about everything DW does.
> - have your action plugin check the page's metadata for that key
> information and then use it to generate the JS/CSS where it can be
> added to the TPL_METAHEADER_OUTPUT data.
> - check how caching impacts on what you are trying to do. You want to
> write stable information into the metadata so that caching will have
> no impact on it and your page. The action plugin can be responsible
> for generating uncacheable information.
Chris,
First of all, thanks a lot for these details.
Here is what I did :
- I read more carefully the doc
- I tested the $mode == 'metadata' in the render method of my syntax
plugin class
- I populated the $renderer->meta array with my CSS/JS data
- Then I tried to read these data in my customized
TPL_METAHEADER_OUTPUT hook in the action plugin
The first problem is that I'm unable to access the $renderer->meta
array from my customized hook, I don't know where I could find it.
The second problem is that I tried to do some simple "echo" in the
render method and in my customized hook method: I noticed that the
hook method is run before the render method so even though I well
populate the $renderer->meta array, I don't understand how I could
access these data in the customized hook.
Am I wrong ?
--
Stéphane GULLY
http://www.zeitoun.net
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: how to add dynamic css from a plugin ?
- From: Christopher Smith
- References:
- [dokuwiki] how to add dynamic css from a plugin ?
- From: Stéphane Gully
- [dokuwiki] Re: how to add dynamic css from a plugin ?
- From: Michael Klier
- [dokuwiki] Re: how to add dynamic css from a plugin ?
- From: Stéphane Gully
- [dokuwiki] Re: how to add dynamic css from a plugin ?
- From: Christopher Smith
Other related posts:
- » [dokuwiki] how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- » [dokuwiki] Re: how to add dynamic css from a plugin ?
- [dokuwiki] Re: how to add dynamic css from a plugin ?
- From: Christopher Smith
- [dokuwiki] how to add dynamic css from a plugin ?
- From: Stéphane Gully
- [dokuwiki] Re: how to add dynamic css from a plugin ?
- From: Michael Klier
- [dokuwiki] Re: how to add dynamic css from a plugin ?
- From: Stéphane Gully
- [dokuwiki] Re: how to add dynamic css from a plugin ?
- From: Christopher Smith