Wiki source code of Skin

Version 15.1 by Raluca Stavro on 2009/12/09

Show last authors
1 ~{~{velocity}} {{velocity filter="none"}}{{html clean="false" wiki="true"}}$xwiki.ssx.use($doc.fullName){{/html}}{{/velocity}} ~{~{/velocity}} (% class="floatinginfobox" %)~(~(~( ***Contents***
2
3 ~{~{toc depth="3" start="2"/}} ~)~)~) ==XWiki Skins==
4
5 ~{~{id name="s1" /}} ==XWiki Skin used for?== A XWiki Skin is used to customize the interface of a XWiki Enterprise instance. ~{~{id name="s2" /}} ==What are the components that define a XWiki Skin?== A XWiki Skin is composed of:
6
7 * (% class="sectionblockcodecolored" %)[[[Velocity templates>>||target="platform:DevGuide.Scripting#velocity"]]]
8 * (% class="sectionblockcodecolored" %)[[[~~{~~{html}}<acronym title="Cascading Style Sheets">>CSS</acronym||target="{{/html}}"]]]
9 * (% class="sectionblockcodecolored" %)[[[Javascript files>>||target="platform:DevGuide.JavaScriptAPI"]]](%%) and
10 * (% class="sectionblockcodecolored" %)Images
11
12 All these components are stored on the server that hosts the XWiki Enterprise instance, inside the (% class="sectionblockcodecolored directory" %)webapps/xwiki(%%) folder. ~{~{id name="s3" /}} ==How to change the Skin== ~{~{id name="3a" /}}===A. The default XWiki Skins=== A XWiki Enterprise instance contains by default a [[[list of Skins>>||target="code:Skins.WebHome"]]] like:
13
14 * the (% class="sectionblockcodecolored" %)[[[albatross>>||target="code:Skins.AlbatrossSkin"]]](%%) Skin
15 * the (% class="sectionblockcodecolored" %)[[[toucan>>||target="code:Skins.ToucanSkin"]]](%%) Skin
16 * the (% class="sectionblockcodecolored" %)[[[colibri>>||target="code:Skins.ColibriSkin"]]](%%) Skin and
17 * 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 )
18
19 ~{~{id name="3b" /}}===B. The usage level for a XWiki Skin=== A Skin can be used at different levels:
20
21 * 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 )
22 * for a (% class="sectionblockcodecolored" %)space(%%) inside the XWiki Enterprise instance ( it has a higher priority then the (% class="sectionblockcodecolored" %)instance(%%) level Skin )
23 * for a specific (% class="sectionblockcodecolored" %)user(%%) (it has a higher priority then the (% class="sectionblockcodecolored" %)space(%%) level Skin) and
24 * 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 )
25
26 ~{~{id name="3c" /}} ===C. Changing the Skin=== ~{~{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}} ~{~{id name="3c1" /}}====1. How to preview a Skin applied on a page==== 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 . ~{~{id name="3c2" /}}====2. Changing the Skin at (% class="sectionblockcodecolored" %)instance(%%) level==== 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: |(% style="width:60%;color:#222" %)~(~(~(
27
28 1. go into the (% class="sectionblockcodecolored" %)Administration(%%) interface
29 1. go into the (% class="sectionblockcodecolored" %)Presentation(%%) section
30 1. check the (% class="sectionblockcodecolored" %)Skin(%%) property that stores the full name of the document
31
32 ~)~)~)|~(~(~([[[image:1.png]>>attach:1.png]]~)~)~)
33
34 ~{~{id name="3c2steps" /}}To change the current Skin, follow these steps: |(% style="width:60%;color:#222" %)~(~(~(
35
36 1. click on the (% class="sectionblockcodecolored" %)CUSTOMIZE(%%) button right beside the (% class="sectionblockcodecolored" %)Skin(%%) property, to open the document
37 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
38 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(%%) )
39 1. save the document
40
41 ~)~)~)|~(~(~([[[image:2.png]>>attach:2.png]]~)~)~)
42
43 You can now open any page inside the wiki instance and you will notice the layout difference. ~{~{id name="3c3" /}}====3. Changing the Skin at (% class="sectionblockcodecolored" %)space(%%) level==== 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: |(% style="width:60%;color:#222" %)~(~(~(
44
45 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/ )
46 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
47 1. go into the (% class="sectionblockcodecolored" %)Presentation(%%) section
48 1. follow the steps 4, 5, 6 and 7 from inside the section [[[C-2>>||target="#3c2"]]]
49
50 ~)~)~)|~(~(~([[[image:3.png]>>attach:3.png]]~)~)~)
51
52 You can now open any page inside the (% class="sectionblockcodecolored" %)Main(%%) space and you will notice the layout difference. ~)~)~) ~{~{id name="3c4" /}}====4. Changing the Skin at (% class="sectionblockcodecolored" %)user(%%) level==== For example, if you want to use the (% class="sectionblockcodecolored" %)toucan(%%) Skin for a specific (% class="sectionblockcodecolored" %)user(%%), follow these steps:
53
54 1. go to the user's (% class="sectionblockcodecolored" %)profile(%%) page
55 1. edit the document's objects ( if you are in edit mode, use the right panel and choose the (% class="sectionblockcodecolored" %)Objects(%%) editor, or, if you are in view mode, use the top-left menu: (% class="sectionblockcodecolored" %)EDIT -> OBJECTS(%%))
56 1. set the value of the (% class="sectionblockcodecolored" %)skin(%%) property as being (% class="sectionblockcodecolored" %)toucan
57 1. save the document
58
59 Now, all the pages inside the instance will have the (% class="sectionblockcodecolored" %)toucan(%%) Skin applied on them for that user.

Get Connected