[dokuwiki] Re: Generating HTML HEAD content with syntax plugins

  • From: Myron Turner <turnermm02@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 07 Sep 2007 08:12:00 -0500

Unless I'm missing something in what you've asked, I can see two ways of doing this. First, if your CSS applies to all the pages you are outputting, you could simply place a style section in the HTML Head section of main.php. You have considerable flexibility here, since you could output the CSS using php and you'd have access to the dokuwiki $INF and $conf arrays and would be able to create CSS in response to different users and pages. You could also use an action plugin, instead of a syntax plugin, and trigger it at the end of the HEAD section of main.php. You can write the CSS directly to the page at the triggered point of entry.


Gabriel Birke wrote:

I'm trying to generate some custom styles (CSS definitions between two style
tags) with a syntax plugin. However, style tags are not allowed in the HTML
BODY section, only in the HEAD section. While the browser applies the styles
correctly, the generatiion of nonvalidating XHTML bothers me.

Now before I do some heavy coding I have two questions:
1) Is there an easy way to accomplish my goal? Maybe I have overlooked
2) Is anyone except me interested in such a functionality? Would a patch be




Myron Turner

DokuWiki mailing list - more info at

Other related posts: