Here's how to make your wiki use a wiki page for its CSS stylesheet. This makes changing the look of your site quick and collaborative.
- add a DTML Method in your wiki folder with id
stylesheet, containing just this line:<dtml-var "StyleSheet.text()"> - add a wiki page named
StyleSheetwithPlain textas the page type, containing the contents ofProducts/ZWiki/skins/zwiki_standard/stylesheet.cssfrom your filesystem (or the latest from http://zwiki.org/zwikidir/skins/zwiki_standard/stylesheet.css) - make some changes to the StyleSheet page. You should see the effect immediately.
Note,
- anyone who can edit the stylesheet will be able to make your site look like anything. To restrict this, go to the StyleSheet page's ZMI security tab and uncheck some roles for the
Zwiki: Edit pagespermission - when you make your stylesheet dynamic like this, the HTTP caching headers will change so that browsers must reload the stylesheet on every page view. This may slightly affect page loading times in some cases.
Example: see the stylesheet for this site below. If you make a test edit, please do something discreet and afterward return it to a good state, so as not to disrupt the site for others.
A Little More Versatility -- Thu, 29 Sep 2005 03:41:45 -0700 reply
Great! I finally have a solution to a dilemma I have had for a while.
Sometime ago I started using the stylesheet DTML method approach and always put the stylesheet.css contents into it. But whenever I changed ZWiki versions, I always had to copy the contents of the new stylesheet.css then go back and add in my own modifications. Now I have a solution so I do not have to do this!
As above, I create a DTML method and named it stylesheet. However, I enter the following two lines:
<dtml-var "StyleSheetZWikiOrg.text()">
<dtml-var "StyleSheetMine.text()">
Then, I created two ZWiki pages with Plain text as the page type and named them:
Style Sheet – ZWiki Org
Style Sheet - Mine
Now I simply copy the stylesheet.css contents to the StyleSheetZWikiOrg page and put all my markup into StyleSheetMine.
I fired it all up and it works great!