[pmwiki-users] css for just one wikigroup

Patrick R. Michaud pmichaud at pobox.com
Mon Nov 6 20:55:04 CST 2006


On Mon, Nov 06, 2006 at 12:17:42PM +0000, Hans wrote:
> Monday, November 6, 2006, 12:10:17 PM, marc wrote:
> >> And a recipe author when using this method
> >> ($HTMLHeaderFmt) has no control where the code will be placed.
> 
> > I really should check, but I presumed it is first in, first out; in 
> > which case, this scenario shouldn't happen without the recipe author
> > trying quite hard to break things :-( 
> 
> No. The recipe author does not need to try hard at all, and I doubt it
> is ever intended to have the styles loaded by  a recipe after skin and
> local styles. Just using $HTMLHeaderFmt from within a function called
> by the recipe markup is sufficient. I have not investigated the
> reasons for this (Pm will know), but it must be connected with markup
> handling.

It is indeed "first in, first out".  The reason that the recipe's
markup appears last is because markup handling happens last -- i.e.,
after all scripts, configuraions, and recipes have been loaded.
So, if a recipe waits until markup handling to add something to
$HTMLHeaderFmt, then its entry will indeed occur last (unless
something has reserved a position for it in the $HTMLHeaderFmt
sequence, as outlined in my previous message).

There's also nothing that says a recipe cannot do other manipulations
to $HTMLHeaderFmt, such as making sure that its entry comes at the
beginning ot $HTMLHeaderFmt instead of the end.

But if this is _really_ a big issue, we could always create a special
slot for recipe headers, such that a recipe would do:

    $HTMLHeaderFmt['recipes']['recipename'] = '...recipe header...';

and PmWiki would make sure that this occurs immediately after
$HTMLHeaderFmt['styles'].  

So far I'm not convinced it's a big issue that deserves special
handling, since recipes already have sufficient control to get
the desired effect (whatever it may be).

Pm




More information about the pmwiki-users mailing list