Website Downloads Documentation Knowledgebase Wiki Issue tracker Commercial support

Daisy Wiki Sites

What is a Daisy Wiki "site"?

A Daisy Wiki site allows to have a specific view on a Daisy Repository. A site is configured with a default collection (the concept of document collections is explained on the documents page). Full text searches and recent changes are automatically limited to only show documents from that default collection. Each site can have its own (root) navigation tree, and is configured with a specific document as the homepage of the site.

The Repository Server isn't aware of the concept of sites, nor does the site concept partition the repository in any way.

Defining sites

Sites are defined by creating a directory for the site and putting a siteconf.xml file in it. This directory should be created in the "sites" directory. By default, this sites directory is located at:

DAISY_HOME/daisywiki/webapp/daisy/sites

The location of this directory can be changed in the cocoon.xconf.

The content of the siteconf.xml file should strictly adhere to a certain schema, otherwise the site will be ignored (in that case, an error will be logged in cocoon's log files). An example siteconf.xml is displayed below.

<siteconf xmlns="http://outerx.org/daisy/1.0#siteconf">
  <title>foobar</title>
  <description>The "foobar" site</description>
  <skin>default</skin>
  <navigationDocId>1</navigationDocId>
  <homepageDocId>2</homepageDocId>
  <collectionId>1</collectionId>
  <contextualizedTree>false</contextualizedTree>
  <newVersionStateDefault>publish</newVersionStateDefault>
  <locking>
    <automatic lockType='pessimistic' defaultTime='15' autoExtend='true'/>
  </locking>
</siteconf>
  • title: a short name for the site, which must be the same as the name of the directory the siteconf.xml is located in. This is also the name that will appear in the URL. Take something without spaces for this.
  • description: a description for the site, shown on the sites overview page
  • skin: the skin to use for this site
  • navigationDocId: the ID of the navigation document
  • homepageDocId: the ID of the homepage
  • collectionId: the ID of the default collection for the site
  • contextualizedTree: true or false. Indicates whether the navigation tree should be shown in full (= when false), or if the navigation tree should only have open branches leading to the selected node (= when true)
  • newVersionStateDefault: publish or draft. This indicates the default state of the "Publish changes immediately" flag on the edit screen.
  • locking: the locking strategy to use. To use no locking at all, remove the <automatic> element (but leave the empty <locking> element). To use warn-locking, ie only warning that someone else is editing the page but still allowing concurrent edits, change the lockType attribute to "warn".

Thus to create a new site, all you need to do is create a new subdirectory in the sites directory and put such a siteconf.xml in it.

Changes to the sites configurations are automatically picked up, it is not needed to restart the Daisy Wiki. It can take up to 10 seconds before Daisy notices your changes (this interval is configurable in the cocoon.xconf). If you don't see a site appearing, check the cocoon log files for errors.

Creating a new site using daisy-wiki-add-site

If you want to create a new site, including a new collection, a new navigation tree and a new homepage document, you can use the daisy-wiki-add-site program for this, which will automatically perform these steps for you and put a new siteconf.xml in the sites directory. To do this, open a command prompt, make sure DAISY_HOME is set, go to DAISY_HOME/install, and execute daisy-wiki-add-site.

Other site-features

skinconf.xml

Maintaining a custom skin can be more work then you'd like to put into it, therefore it is also possible to customise (or parameterise) existing skins. For example, for the default skin you can alter the logo in this way.

This is done by putting a file called skinconf.xml in the appropriate site directory. The contents of this file will be merged in the XML pipelines and hence be available to the XSL stylesheets. The required content and format of this file depends upon what the skin you use expects.

If a site-specific skinconf.xml is not provided, the system will use the skinconf.xml found in the root of the sites directory, if it exists.

If you add or change a skinconf.xml while the Daisy Wiki is running, you need to touch the siteconf.xml file before Daisy will notice the changes. "Touching" means changing its last modified timestamp. In Linux this can be done using the "touch" command, on Windows you can do this by re-saving the file.

Extension sitemaps

TODO

Comments (0)
Advertisement

Daisy hosting, installation, support. Workshops and turnkey Daisy CMS projects. Get Daisy from its creators.

outerthought.org

Downloads provided by

SourceForge.net Logo

Open source stats