In this chapter you'll learn

Attention!

updates in progress here, see also ViewGeddon etc.

About Zwiki skins

When first installed, a new zwiki displays one of two "skins", depending on whether it is in a Plone site or not:

  1. 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
  1. 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.

Customizing with properties

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:

  1. go to your wiki folder's Properties tab in the ZMI (just add /manage_propertiesForm to the folder url)

  2. 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.

Customizing the style sheet

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:

  1. view your wiki folder's contents in the ZMI
  2. add a File with id stylesheet.
  3. paste or upload the default stylesheet into it
  4. make some changes. Eg change body's background-color.
  5. 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..

Customizing skin templates

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.

For an example see http://nautica.demo.zwiki.org and the howto: HowToCreateZwikiSkinsFromOpenWebTemplates

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.

Customizing the subtopics

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.

A note about upgrading

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.

Downloadable skins

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:

How to share your skin with others

It's easy to make a custom skin and share it with others. There are a lot of current and potential Zwiki users out there who would love to get their hands on some attractive new skins, so don't be shy! We can help you on #zwiki or the zwiki list. Note a screenshot or best of all, a demo of your skin is worth a thousand words. Here are some options.

  • Package your skin templates in a tarball, post a link on this page.
  • Publish your templates in a darcs repository. This will make it easy for you to pull the latest Zwiki changes, and easy for everyone to pull your skin changes.
  • Get your skin included with Zwiki, in skins/. This gives greatest visibility to developers and users.

Questions and answers

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.

Recap

You've learned:

  • 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

Fixed, thanks.

Dead Link --andmalc, Thu, 15 Jun 2006 05:46:45 -0700 reply

The link to the Tim Morgan skin is dead

Subtopic appearance and Plone --HeikoStoermer?, Thu, 31 May 2007 01:04:15 -0700 reply

The settings described here to change the skin for the subtopics has no effect in Plone (at least not in mine).

Subtopic appearance and Plone --EmmaLaurijssens, Thu, 31 May 2007 01:15:49 -0700 reply

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

teste