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.

  1. add a DTML Method in your wiki folder with id stylesheet, containing just this line:
           <dtml-var "StyleSheet.text()">
    
  2. add a wiki page named StyleSheet with Plain text as the page type, containing the contents of Products/ZWiki/skins/zwiki_standard/stylesheet.css from your filesystem (or the latest from http://zwiki.org/zwikidir/skins/zwiki_standard/stylesheet.css)
  3. make some changes to the StyleSheet page. You should see the effect immediately.

Note,

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.


comments:

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!