[pmwiki-users] css for just one wikigroup

Patrick R. Michaud pmichaud at pobox.com
Mon Nov 6 20:45:42 CST 2006


On Sun, Nov 05, 2006 at 02:42:24PM +0000, Hans wrote:
> I think it is quite smart if recipes restrict their style loading only
> to occur on pages it is needed, which may be just pages where the
> markup is placed. Still this type of loading appears late in the
> sequence, in fact later than the pub/css/ localisations.
> This could lead to undesired results, and may not be what an admin
> expects when she includes a recipe for general use in config.php.

A recipe can manage this by doing the following when it is loaded:

    $HTMLHeaderFmt['recipe'] = '';

and then later (when the markup is activated):

    $HTMLHeaderFmt['recipe'] = "<link rel='stylesheet' ... />";

The first line "reserves the recipe's position" in the headers,
while the second actually inserts the markup at that position.

Pm




More information about the pmwiki-users mailing list