Ticket #246 (closed task: duplicate)
New config parameter: additional_stylesheets
| Reported by: | BrianKoontz | Owned by: | unassigned |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.3.3 |
| Component: | architecture | Version: | 1.1.6.5 |
| Severity: | normal | Keywords: | |
| Cc: | JavaWoman, DotMG, DarTar |
Description (last modified by BrianKoontz) (diff)
There is no way I can tell to add additional CSS stylesheets to the <head> section of Wikka output without modifying header.php. For plugins, it would be convenient to permit the specification of additional stylesheets in wikka.config.php. I propose a new config parameter, "additional_stylesheets", that would allow users to specify a space-delimited set of additional stylesheets, depending on the plugins they are using. This would also alleviate the problem of polluting the Wikka core stylesheets with plugin CSS elements. A future package manager would simply add its stylesheet to the user's existing list of stylesheets:
additional_stylesheets = "bookmarkmgr.css someotherplugin.css"
To implement, add the following codeblock to actions/header.php:
<link rel="stylesheet" type="text/css" href="css/<?php echo $this->GetConfigValue("stylesheet") ?>" /> // Change starts here: <?php if($this->GetConfigValue("additional_stylesheets") != NULL) { $sheets = preg_split("/[\s]+/", $this->GetConfigValue("additional_stylesheets")); foreach($sheets as $sheet) { echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/".$sheet."\" />\n"; } } ?>