Daisy documentation
5 Daisy WikiBook Index5.1.3 Creating a new site using daisy-wiki-add-site

5.1.2 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:

<wikidata directory>/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 (thus no extra elements/attributes are allowed), otherwise the site will be ignored (in that case, an error will be logged in Cocoon's log files). siteconf.xml syntax

An example siteconf.xml is displayed below.

<siteconf xmlns="http://outerx.org/daisy/1.0#siteconf">
  <description>The "foobar" site</description>
  <!-- homepage>....</homepage -->
  <!-- collectionName>myCollection</collectionName -->
  <!-- navigationDepth>4</navigationDepth -->
  <!-- defaultReferenceLanguage>default</defaultReferenceLanguage -->
  <siteSwitching mode="all"/>
    <automatic lockType='pessimistic' defaultTime='15' autoExtend='true'/>
    <include name="foo*"/>
    <exclude name="bar*"/>






a (typically short) title for the site



a description for the site, shown on the sites overview page



the skin to use for this site



the ID of the navigation document


one of these

the ID of the homepage


a path to the homepage, used instead of the homepageDocId. Usually this is a path to a Wiki extension (ext/something)


one of these

the ID of the default collection for the site


the name of the default collection of the site. Will only be used when collectionId is not set.



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)


always displays the first n levels of the navigation tree. When using this with contextualizedTree=true then the first n levels will always be shown no matter what and more may be shown as you progress through the navigation.  When using contrextualizedTree=false then only the first n levels will be shown no matter at what place the current document happens to be in the navigation.


no, default main

default branch for the site (specify either the branch ID or name)


no, default "default"

default language for the site (specify either the language ID or name)



default language for new documents (specify either the language ID or name)



the default document type for this site. The document type can be specified either by ID or by name.



which publisher request set to be used for the p:preparedDocuments publisher request for pages rendered in this site.



defines if the browser should be redirected to another site if a document is better suited for display in another site. Valid values for the mode attribute are: stay (never switch to another site), all (consider all available sites as sites to switch to), selected (consider only selected sites, listed in <site> child elements inside the <siteSwitching> element). For more information see URL space management.



publish or draft. This indicates the default state of the "Publish changes immediately" flag on the edit screen.


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, i.e. only warning that someone else is editing the page but still allowing concurrent edits, change the lockType attribute to "warn".



allows to specify a filter for the document types that should be visible when creating a new document within this site. Zero or more include and/or exclude patterns can be specified, the order of the patterns is of no importance. Document types will be shown if they match at least one include pattern and no exclude pattern. If there are only exclude patterns, an implicit <include name="*"/> is assumed.

The patterns can be literal strings, or can contain the wildcards * and ?. The wildcard * matches zero or more characters. The wildcard ? matches exactly one character. To match one or more characters, you can use ?*. While document type names can't contain these characters, for completes we mention that the wildcards can be escaped using \* and \?, and backslash when used in this context can be escaped using \\ (thus \\* and \\?).

Note that this feature is not an access control, it forbids nothing, it just filters the document type list when shown. Creating a site

Again, all you need to do to define a new site is creating a new subdirectory in the sites directory and putting a valid siteconf.xml in it. Removing a site

To make a site unavailable, you can: Runtime detection of new/updated/deleted siteconf's

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. Site filtering

The list of sites displayed to the user is filtered based on whether the user has access to the homepage document of the site. In case a custom homepage path is used (<homepage> instead of <homepageDocId>), you can still specify the homepageDocId to cause filtering. If this is not done, the site will always be displayed in the list.

5 Daisy Wiki5.1.3 Creating a new site using daisy-wiki-add-site