What is a XWiki Skin used for ?
A XWiki skin is used to customize the interface of a XWiki Enterprise instance.
A skin is composed of:
All these components are stored on the server that hosts the XWiki Enterprise instance, inside the webapps/xwiki/ folder. Each XWiki skin has its own directory.
The default XWiki Skins
An XWiki Enterprise instance contains several skins by default, such as:
- The Colibri skin
- The Toucan skin
The full list of XWiki skins that are included in your XWiki Enterprise instance can be found on the server filesystem, inside the webapps/xwiki/skins folder.
The usage level for a XWiki Skin
A Skin can be used at different levels:
- For the entire XWiki Enterprise instance. If no skin is set at other levels, the pages will use the global instance skin.
- For a space inside the XWiki Enterprise instance. It has a higher priority than the instance level skin.
- For a specific user. It has a higher priority than the space level skin. For more details check this tutorial.
- For other custom levels that can be created by modifying the Velocity templates inside the skin (for example, a skin can be set for a specific page, for a specific group of users and so on).
Changing the Skin
How to preview a Skin applied on a page
To check how a page looks when changing the skin, you can add a parameter named skin to the page URL. For example, to preview the wiki main page with the Toucan skin, use the following URL: http://localhost:8080/xwiki/bin/view/Main/WebHome/?skin=toucan. If you want to preview the page using a skin document named MySpace.MySkinDoc, use the following URL: http://localhost:8080/xwiki/bin/view/Main/WebHome/?skin=MySpace.MySkinDoc.
Changing the Skin at instance level
Each XWiki Enterprise instance contains a skin document that stores the skin for the instance. In order to find out which document is used to store the current skin, the user has to follow these steps:
- Hover over "Wiki" and click on "Administer Wiki"
- Click on the Presentation link
- Click on the Customize button from the skin section
- Edit the page in Object mode
- You have multiple text areas where you can override the default behavior of your skin. Make your desired modifications.
- Click on Save and View
- Your settings will be applied and the skin should change accordingly
Changing the Skin at space level
A XWiki space can have its own skin. For example, if you want to set the Toucan skin for the Main space you should follow these steps:
- Go to any page inside the Main space
- From the top Space menu, click "Administer Space" to open the administration interface for the Main space
- Click on the Presentation link
- Write "toucan" in the Skin field. (if you have defined another skin, you should fill in the directory name which contains the skin)
- Click on Save
- If you open any page inside the Main space you will notice the layout difference
Changing the Skin for a user
If you want to use the Toucan skin for a specific user follow these steps:
- Go to the user's profile page
- Edit the page in Objects mode
- Set the value of the "skin" property (under Objects of type XWiki.XWikiUsers) to toucan (you must use lowercase letters)
- Click on Save and View
- Now all the pages inside the wiki will use the toucan skin for that user
More about XWiki Skins
In order to find out more about the XWiki Skins, check the Skins Tutorial in the Developer Guide and the Skins Tutorial in the User Guide.