In this chapter you'll learn
- about Zwiki's standard and plone skins
- how a zwiki's appearance is controlled by folder properties, a stylesheet, and page templates
- how to customize a zwiki's logo
- how to customize a zwiki's background colour and other CSS styles
- how to customize any part of a zwiki's user interface
- what other skins are available
- how to maintain and share your own skins
updates in progress here, see also ViewGeddon etc.
When first installed, a new zwiki displays one of two "skins", depending on whether it is in a Plone site or not:
- ordinary non-plone zwikis show the standard skin. Example: http://zwiki.org (you are using it now). The standard skin has evolved with these goals in mind:
- be a neutral, general-purpose default that's usable out of the box for all users
- be functional, ergonomic, and as fast as possible.
- don't distract from the page content
- don't scare anyone too badly
- zwikis inside a Plone or CMF site show the zwiki_plone skin. Example: http://plone.zwiki.org . This skin provides the usual CMF/Plone user interface. Note: people used to wikis may find this a bit slower and less efficient; HowToUseTheStandardSkinInPlone describes how to make the standard skin available in a Plone site.
A Zwiki skin is made up of about 25 specially-named page templates providing the different parts of Zwiki's user interface - the main page view, the edit form, the backlinks form, etc. These templates are in the Zwiki product's skins/standard and skins/zwiki_plone directories on the filesystem. They may be overridden by templates in the ZODB, described below.
You can change some aspects of a zwiki's appearance by setting properties on the wiki folder (in the same way as we configured its behaviour in configuring). This depends somewhat on the skin you are using; QuickReference has details.
For example, when using the standard skin, probably the first thing you'll want to do is change the wiki's logo. Here's how:
go to your wiki folder's Properties tab in the ZMI (just add /manage_propertiesForm to the folder url)
add a string property named site_logo containing a HTML image tag, eg:
<img src="http://site/path/logo.png" border="0">
The url can be absolute or relative; if you upload logo.png to the wiki, just src="logo.png" will do.)
You can also just add an Image object with id site_logo in your wiki folder, it says here.
The best way to make a lot of cosmetic changes with minimal disruption is to customize the wiki's CSS stylesheet. Here's how to do this with the standard skin:
- view your wiki folder's contents in the ZMI
- add a File with id stylesheet.
- paste or upload the default stylesheet into it
- make some changes. Eg change body's background-color.
- reload one of your wiki pages. Voila, you should see the new style.
You could use a DTML Method instead, for a dynamic stylesheet. Even better, see HowToMakeAnEditableStylesheet.
In Plone sites the plone styles are used, so edit http://YOURSITE/portal_skins/plone_styles/ploneCustom.css instead.
This an example of..
You can tweak a zwiki's appearance, or give it a completely new user interface, by customizing one or more skin templates. The usual way is to create a page template of the same name (without the .pt suffix) in your wiki folder in the ZODB using the ZMI. This overrides the template on the filesystem; no zope restart is required. It affects just that one wiki. Or, if you put the template in a parent folder, you can affect multiple wikis at once by acquisition.
In a CMF or Plone site, the portal_skins mechanism is used, so the details are slightly different, but it's the same principle. HowToCustomizeZwikiStandardSkin describes all this.
It's less common, but you can also edit the default templates in ZWiki/skins/* on the filesystem and restart zope. This will affect all zwikis on the server.
As described in configuring, Zwiki automatically displays any subtopics of the current page, and you can turn off this feature by setting a boolean show_subtopics property on the wiki folder to false.
You can also select which template is used to display the subtopics, using a string subtopics_style folder property. The default is outline, which means use the subtopics_outline template.
You can change it to board, which selects the subtopics_board template. This is an alternate built-in template which lists the immediate child pages in message board style. If you have the ZopeWiki:mxmCounter product installed, a page views column will be included.
Or, you can override these templates in the usual way. Or, you can set subtopics_style to something else and provide the appropriate subtopics_... template.
Customizing skin templates has a downside: customized templates, unlike the defaults, are not automatically updated when you upgrade Zwiki. They will almost always keep working as before, but you may not see all of the latest features as on zwiki.org. This is easily fixed by reverting to the defaults (rename or remove your custom templates), or by merging Zwiki's latest skin changes into your templates (this will be easier if you keep track of your changes). If you do this a lot, you might consider customizing on the filesystem and upgrading directly from the CodeRepos; darcs will merge the latest changes without destroying yours.
Third-party skins may be installed, of course. There aren't any of these being kept up to date at present. Please add yours here with screenshots. Examples:
- Tim Morgan has a nice modern skin running at http://timmorgan.org/wiki
- Hallstein Lohne is offering to share this commonplace-based skin: http://doc.uib.no/wiki/HomePage
- DanMcmullen did a METAL refactoring of the standard skin called WikipageX. This was incorporated in Zwiki 0.25.
- JordanCarswell made an attractive wiki template (skin + set of default pages) called CommonPlace, currently abandonware. (Update: Jordan has made a new skin, follow the link.)
- JohnGreenaway made some nice early skins, no longer accessible.
- PeopleUsingZwiki is a good place to scout for new skins.
- darktech v0.1. Be sure to read INSTALL.txt
- How do I change the list of allowed page types in the edit form ? --
- See the configuring chapter.
- The "last edited by" uses my zope login name, not the username I configured in zwiki options. Can I change this ? --
- Yes, an authenticated zope username takes precedence over the zwiki_username cookie. To change this you would need to alter zwiki_username_or_ip() in ZWikiPage.py.
- the stuff we said above
You now know enough to build an awesome-looking wiki. But a successful wiki depends also on good content. Let's talk about wiki management.
Link to default stylesheet is broken --toddogas, Tue, 11 Apr 2006 13:22:21 -0700 reply
The link to the default stylesheet (URL = http://zwiki.org/zwikidir/skins/standard/stylesheet.css ) is broken.
Link to default stylesheet is broken --simon, Tue, 11 Apr 2006 13:26:03 -0700 reply
Dead Link --andmalc, Thu, 15 Jun 2006 05:46:45 -0700 reply
The link to the Tim Morgan skin is dead
The settings described here to change the skin for the subtopics has no effect in Plone (at least not in mine).
Which Zope, Plone and Zwiki versions are you using? It works on my site, http://ictio.nl/ictiwiki
teste --luxcas, Mon, 18 Oct 2010 13:51:04 -0700 reply