[Pmwiki-users] CSS links under 0.6.1 or later

Patrick R. Michaud pmichaud
Mon Feb 23 18:41:54 CST 2004


> From: Nathan Jones [mailto:nathanj at optimo.com.au] 
> With 0.6.0, PmWiki would include stdlayout.css, plus a 
> skin css, plus $Group.css and $Group.$Title.css (but only if they existed).
> 
> What's the deal with 0.6.2? Am I right in saying that the css files 
> included are only those mentioned in the template? (I certainly 
> wouldn't want PmWiki to generate output that is different to what is in the
> template.)

You're correct, in 0.6.2 PmWiki only includes those CSS files listed
in the template.  It also uses $HTMLHeaders to generate the 
<meta name="robots" ... /> tag.

> If I want the same template for the whole site, but some different 
> CSS for one group, which path would you suggest?

On Tue, Feb 24, 2004 at 11:37:32AM +1100, Richard Canning wrote:
> The way it seems to work is you put the following into the Group.php file.
> 
> $HTMLHeaders .= "   <link rel='stylesheet' 
>    href='$PubDirUrl/css/YourGroup.css' type='text/css' />\n";

This is the correct solution--just add it to the $HTMLHeaders.

> But I am sure it would not be too hard to add a line that 
> would check if there is a Group.css file and add this line 
> if it exists, and do the same for pages.....

    $group = FmtPageName('$Group',$pagename);
    if (file_exists("pub/css/$group.css")) 
      $HTMLHeaders .= "<link rel='stylesheet' type='text/css'
        href='$PubDirUrl/css/$group.css' />";

> However, this seems a lot more clumsy than the way it used to be 
> where it would automatically put them in if they were there.
> Patrick?

Well, we could certainly add such capability as a cookbook recipe.
And it would not be too difficult for me to add something like
the above back to the default configuration...  

Pm



More information about the pmwiki-users mailing list