Wiki source code of Skins

Version 28.4 by kayasaman on 2012/02/06

Hide last authors
serasset 21.2 1 (% class="floatinginfobox" %)
2 (((
Raluca Stavro 16.1 3 **Contents**
Raluca Stavro 14.1 4
Sorin Burjan 25.11 5 {{toc/}}
Raluca Stavro 16.1 6 )))
Vincent Massol 6.2 7
Sorin Burjan 25.12 8 = What is a XWiki Skin used for? =
Sorin Burjan 25.3 9
Silvia Macovei 25.14 10 An XWiki Skin is used to customize the interface of a XWiki Enterprise instance.
11 A Skin is composed of:
Sorin Burjan 25.2 12 * [[Velocity templates>>platform:DevGuide.Scripting#velocity]]
13 * [[CSS files (stylesheets)>>platform:AdminGuide.CSS files]]
14 * [[Javascript files>>platform:DevGuide.JavaScriptAPI]]
15 * Images
Silvia Macovei 25.14 16 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.
serasset 21.2 17
Sorin Burjan 25.12 18 = The default XWiki Skins =
serasset 21.2 19
Silvia Macovei 25.14 20 An XWiki Enterprise instance contains several skins by default, such as:
Sorin Burjan 25.9 21 * The [[Albatross>>extensions:Extension.Albatross Skin]] Skin
22 * The [[Toucan>>extensions:Extension.Toucan Skin]] Skin
23 * The [[Colibri>>extensions:Extension.Colibri Skin]] Skin
Silvia Macovei 25.14 24 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.
Vincent Massol 1.37 25
Sorin Burjan 25.12 26 = The usage level for a XWiki Skin =
serasset 21.2 27
serasset 21.3 28 A Skin can be used at different levels:
Silvia Macovei 25.14 29 * For the entire XWiki Enterprise instance. If no Skin is set at other levels, the pages will use the global instance Skin
30 * For a space inside the XWiki Enterprise instance. It has a higher priority than the instance level Skin
Vincent Massol 27.1 31 * For a specific user. It has a higher priority than the space level Skin. Click [[here>>#HChangingtheSkinforauser]] for more details
Silvia Macovei 25.14 32 * 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)
serasset 21.3 33
Silvia Macovei 26.2 34 == Changing the Skin ==
Sorin Burjan 25.12 35
serasset 21.2 36 {{warning}}To change the Skin, the user must have administrating rights. In the case that you have these rights, make sure that you switch to the Advanced mode in your profile, to enable the advanced options on the top main menu.{{/warning}}
serasset 21.3 37
Silvia Macovei 26.2 38 === How to preview a Skin applied on a page ===
serasset 21.2 39
Silvia Macovei 25.14 40 To check how a page looks on 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.
Sorin Burjan 25.3 41
Silvia Macovei 26.2 42 === Changing the Skin at instance level ===
Sorin Burjan 25.3 43
Silvia Macovei 25.14 44 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:
Sorin Burjan 25.3 45
Sorin Burjan 25.4 46 * Go to Wiki Administration page
47 * Click on **Presentation** on the left tab
Sorin Burjan 25.7 48 (((
Silvia Macovei 25.14 49 [[image:skin1.png||style="border:1px solid black; width:650px"]]
Sorin Burjan 25.7 50 )))
Sorin Burjan 25.4 51 * Check the Skin property that stores the full name of the document
Sorin Burjan 25.5 52 * Click on the **Customize** button from the Skin section
Sorin Burjan 25.7 53 (((
Silvia Macovei 25.14 54 [[image:skin2.png||style="border:1px solid black; width:650px"]]
Sorin Burjan 25.7 55 )))
Silvia Macovei 25.14 56 * Click on the **Edit this skin** button or edit the page in Object mode
Sorin Burjan 25.7 57 (((
Silvia Macovei 25.14 58 [[image:skin3||style="border:1px solid black; width:650px"]]
Sorin Burjan 25.7 59 )))
Silvia Macovei 26.2 60 * You have multiple text areas where you can override the default behavior of your skin
Sorin Burjan 25.5 61 * Click on **Save and View**
Sorin Burjan 25.15 62 * Your settings will be applied and the skin should change accordingly.
Sorin Burjan 25.4 63
Silvia Macovei 26.2 64 === Changing the Skin at space level ===
Sorin Burjan 25.3 65
Silvia Macovei 26.2 66 An XWiki space can have its own Skin. For example, if you want to set the Albatross Skin for the Main space you should follow these steps:
serasset 21.2 67
Sorin Burjan 25.5 68 * Go on any page inside the Main space
Silvia Macovei 26.2 69 * From the top Space menu, click Administer space to open the Administration interface for the Main space
Sorin Burjan 25.5 70 * Click on **Presentation** on the left tab
Sorin Burjan 25.7 71 (((
Silvia Macovei 26.2 72 [[image:skin5.png||style="border:1px solid black; width:650px"]]
Sorin Burjan 25.7 73 )))
Silvia Macovei 26.2 74 * For example, to use the Toucan Skin you can write "toucan" in the **Skin** field. If you have defined another Skin, you should fill in directory name which contains the skin. Note that the names are case-sensitive.
75 * Click **Save**
76 * If you open any page inside the Main space you will notice the layout difference.
serasset 21.2 77
Silvia Macovei 26.2 78 === Changing the Skin for a user ===
serasset 21.2 79
Sorin Burjan 25.10 80 For example, if you want to use the Toucan Skin for a specific user, follow these steps:
Sorin Burjan 25.9 81
82 * Go to the user's profile page
83 * Edit the user's objects. Use the top-left menu: Edit -> Objects
Silvia Macovei 26.2 84 * Set the value of the skin(%%) property (under 'Objects of type XWiki.XWikiUsers') to toucan. You must use lowercase letters, remember that skin names are case-sensitive.
Sorin Burjan 25.9 85 (((
86 [[image:skin6.png||style="border:1px solid black; width:650px"]]
87 )))
88 * Click on **Save and View**
Silvia Macovei 26.2 89 * Now, all the pages inside the wiki will have the (% class="sectionblockcodecolored"%)toucan(%%) Skin applied for that user.
Sorin Burjan 25.9 90
Sorin Burjan 25.12 91 = More about XWiki Skins =
serasset 21.2 92
Silvia Macovei 26.2 93 In order to find out more about the XWiki Skins, check the [[Skins Tutorial>>DevGuide.Skins]] in the Developer Guide and the [[Skins Tutorial>>Features.Skins]] in the User Guide.
Raluca Stavro 20.1 94
95
96
serasset 21.2 97

Get Connected