Wiki source code of Skin
Version 19.1 by Raluca Stavro on 2009/12/09
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | $xwiki.ssx.use($doc.fullName) | ||
3 | {{/velocity}} | ||
4 | (% class="floatinginfobox" %)((( | ||
5 | **Contents** | ||
6 | |||
7 | {{toc depth="3" start="2"/}} | ||
8 | ))) | ||
9 | =XWiki Skins= | ||
10 | |||
11 | {{id name="s1" /}} | ||
12 | ==What is a XWiki Skin used for?== | ||
13 | A XWiki Skin is used to customize the interface of a XWiki Enterprise instance. | ||
14 | {{id name="s2" /}} | ||
15 | ==What are the components that define a XWiki Skin?== | ||
16 | A XWiki Skin is composed of: | ||
17 | * (% class="sectionblockcodecolored"%)[[Velocity templates>>platform:DevGuide.Scripting#velocity]](%%) | ||
18 | * (% class="sectionblockcodecolored"%)[[{{html}}<acronym title="Cascading Style Sheets">CSS</acronym>{{/html}} stylesheets>>platform:AdminGuide.CSS files]](%%) | ||
19 | * (% class="sectionblockcodecolored"%)[[Javascript files>>platform:DevGuide.JavaScriptAPI]](%%) and | ||
20 | * (% class="sectionblockcodecolored"%)Images(%%) | ||
21 | |||
22 | All these components are stored on the server that hosts the XWiki Enterprise instance, inside the (% class="sectionblockcodecolored directory"%)webapps/xwiki(%%) folder. | ||
23 | {{id name="s3" /}} ==How to change the Skin== {{id name="3a" /}}===A. The default XWiki Skins=== | ||
24 | A XWiki Enterprise instance contains by default a [[list of Skins>>code:Skins.WebHome]] like: | ||
25 | * the (% class="sectionblockcodecolored"%)[[albatross>>code:Skins.AlbatrossSkin]](%%) Skin | ||
26 | * the (% class="sectionblockcodecolored"%)[[toucan>>code:Skins.ToucanSkin]](%%) Skin | ||
27 | * the (% class="sectionblockcodecolored"%)[[colibri>>code:Skins.ColibriSkin]](%%) Skin and | ||
28 | * other skins ( the full list of XWiki Skins that are included in your XWiki Enterprise instance can be found on the server filesystem, inside the (% class="sectionblockcodecolored directory"%)webapps/xwiki/skins(%%) folder ) | ||
29 | {{id name="3b" /}}===B. The usage level for a XWiki Skin=== | ||
30 | A Skin can be used at different levels: | ||
31 | * for the entire XWiki Enterprise (% class="sectionblockcodecolored"%)instance(%%) ( if there is no Skin set other levels, the pages will use the global (% class="sectionblockcodecolored"%)instance(%%) Skin ) | ||
32 | * for a (% class="sectionblockcodecolored"%)space(%%) inside the XWiki Enterprise instance ( it has a higher priority then the (% class="sectionblockcodecolored"%)instance(%%) level Skin ) | ||
33 | * for a specific (% class="sectionblockcodecolored"%)user(%%) (it has a higher priority then the (% class="sectionblockcodecolored"%)space(%%) level Skin) and | ||
34 | * for other (% class="sectionblockcodecolored"%)custom(%%) levels that can be created by modifying the Velocity templates from inside the Skin ( for example, a Skin can be set for a specific page, for a specific group of users and so on ) | ||
35 | {{id name="3c" /}} ===C. Changing the Skin=== | ||
36 | {{warning}} | ||
37 | 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. | ||
38 | {{/warning}} | ||
39 | {{id name="3c1" /}}====1. How to preview a Skin applied on a page==== | ||
40 | To check how a page looks on changing the Skin, you can add a parameter named (% class="sectionblockcodecolored"%)skin(%%) to the page URL. For example, to preview the wiki main page on using the (% class="sectionblockcodecolored"%)toucan(%%) Skin, use the following URL: http://localhost:8080/xwiki/bin/view/Main/WebHome/?skin=toucan . If you want to preview the page on using a Skin document named (% class="sectionblockcodecolored"%)MySpace.MySkinDoc(%%), use the following URL: http://localhost:8080/xwiki/bin/view/Main/WebHome/?skin=MySpace.MySkinDoc . | ||
41 | {{id name="3c2" /}}====2. Changing the Skin at (% class="sectionblockcodecolored"%)instance(%%) level==== | ||
42 | Each XWiki Enterprise instance contains a document ( (% class="sectionblockcodecolored"%)Skin Document(%%) ) that stores the Skin for the instance. To find out which document is used to store the current Skin, the user has to follow these steps: | ||
43 | |(% style="width:60%;color:#222"%)((( | ||
44 | 1. go into the (% class="sectionblockcodecolored"%)Administration(%%) interface | ||
45 | 1. go into the (% class="sectionblockcodecolored"%)Presentation(%%) section | ||
46 | 1. check the (% class="sectionblockcodecolored"%)Skin(%%) property that stores the full name of the document | ||
47 | )))|((([[[[image:1.png||width="100%" style="border:3px solid #ddd;"]]>>attach:1.png]]))) | ||
48 | |||
49 | {{id name="3c2steps" /}}To change the current Skin, follow these steps: | ||
50 | |(% style="width:60%;color:#222"%)((( | ||
51 | (% start="4" %) | ||
52 | 1. click on the (% class="sectionblockcodecolored"%)CUSTOMIZE(%%) button right beside the (% class="sectionblockcodecolored"%)Skin(%%) property, to open the document | ||
53 | 1. click on the (% class="sectionblockcodecolored"%)Edit this skin(%%) button to edit the document, or go to the top menu and select (% class="sectionblockcodecolored"%)EDIT -> OBJECTS(%%) | ||
54 | 1. change the (% class="sectionblockcodecolored"%)Skin(%%) property ( the property is set to (% class="sectionblockcodecolored"%)colibri(%%) by default ) with the name of another Skin ( for example, (% class="sectionblockcodecolored"%)albatross(%%) ) | ||
55 | 1. save the document | ||
56 | )))|((([[[[image:2.png||width="100%" style="border:3px solid #ddd;"]]>>attach:2.png]]))) | ||
57 | |||
58 | You can now open any page inside the wiki instance and you will notice the layout difference. | ||
59 | {{id name="3c3" /}}====3. Changing the Skin at (% class="sectionblockcodecolored"%)space(%%) level==== | ||
60 | A XWiki space can use it's own Skin. For example, if you want to set as Skin for the space (% class="sectionblockcodecolored"%)Main(%%) as being the (% class="sectionblockcodecolored"%)albatross(%%) Skin, follow these steps: | ||
61 | |(% style="width:60%;color:#222"%)((( | ||
62 | 1. go on any page inside the (% class="sectionblockcodecolored"%)Main(%%) space ( for example, go on the home page: http://localhost:8080/xwiki/bin/view/Main/ ) | ||
63 | 1. from the top right menu, choose (% class="sectionblockcodecolored"%)Administration -> Administer space: Main(%%) to open the (% class="sectionblockcodecolored"%)Administration(%%) interface for the space (% class="sectionblockcodecolored"%)Main(%%) | ||
64 | 1. go into the (% class="sectionblockcodecolored"%)Presentation(%%) section | ||
65 | 1. follow the steps 4, 5, 6 and 7 from inside the section [[C-2>>#3c2]] | ||
66 | )))|((([[[[image:3.png||width="100%" style="border:3px solid #ddd;"]]>>attach:3.png]]))) | ||
67 | |||
68 | You can now open any page inside the (% class="sectionblockcodecolored"%)Main(%%) space and you will notice the layout difference. | ||
69 | ))) | ||
70 |