Wiki source code of Skin

Version 14.1 by Raluca Stavro on 2009/12/09

Hide last authors
Raluca Stavro 14.1 1 {{velocity filter="none"}}
2 {{html clean="false" wiki="true"}}
Vincent Massol 6.2 3 #startfloatingbox()
Raluca Stavro 14.1 4 **Contents**
5
6 {{toc start="2" depth="3" numbered=""/}}
Vincent Massol 6.2 7 #endfloatingbox()
Raluca Stavro 14.1 8 {{/html}}
9 {{/velocity}}
Vincent Massol 6.2 10
Raluca Stavro 14.1 11 ~{~{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:
Vincent Massol 1.37 12
Raluca Stavro 14.1 13 * (% class="sectionblockcodecolored" %)[[[Velocity templates>>||target="platform:DevGuide.Scripting#velocity"]]]
14 * (% class="sectionblockcodecolored" %)[[[~~{~~{html}}<acronym title="Cascading Style Sheets">>CSS</acronym||target="{{/html}}"]]]
15 * (% class="sectionblockcodecolored" %)[[[Javascript files>>||target="platform:DevGuide.JavaScriptAPI"]]](%%) and
16 * (% class="sectionblockcodecolored" %)Images
Vincent Massol 1.37 17
Raluca Stavro 14.1 18 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:
Vincent Massol 1.37 19
Raluca Stavro 14.1 20 * the (% class="sectionblockcodecolored" %)[[[albatross>>||target="code:Skins.AlbatrossSkin"]]](%%) Skin
21 * the (% class="sectionblockcodecolored" %)[[[toucan>>||target="code:Skins.ToucanSkin"]]](%%) Skin
22 * the (% class="sectionblockcodecolored" %)[[[colibri>>||target="code:Skins.ColibriSkin"]]](%%) Skin and
23 * 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 )
Vincent Massol 1.37 24
Raluca Stavro 14.1 25 ~{~{id name="3b" /}}===B. The usage level for a XWiki Skin=== A Skin can be used at different levels:
Vincent Massol 1.37 26
Raluca Stavro 14.1 27 * 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 )
28 * for a (% class="sectionblockcodecolored" %)space(%%) inside the XWiki Enterprise instance ( it has a higher priority then the (% class="sectionblockcodecolored" %)instance(%%) level Skin )
29 * for a specific (% class="sectionblockcodecolored" %)user(%%) (it has a higher priority then the (% class="sectionblockcodecolored" %)space(%%) level Skin) and
30 * 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 )
Vincent Massol 1.37 31
Raluca Stavro 14.1 32 ~{~{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" %)~(~(~(
Vincent Massol 1.37 33
Raluca Stavro 14.1 34 1. go into the (% class="sectionblockcodecolored" %)Administration(%%) interface
35 1. go into the (% class="sectionblockcodecolored" %)Presentation(%%) section
36 1. check the (% class="sectionblockcodecolored" %)Skin(%%) property that stores the full name of the document
slauriere 5.1 37
Raluca Stavro 14.1 38 ~)~)~)|~(~(~([[[image:1.png]>>attach:1.png]]~)~)~)
slauriere 5.1 39
Raluca Stavro 14.1 40 ~{~{id name="3c2steps" /}}To change the current Skin, follow these steps: |(% style="width:60%;color:#222" %)~(~(~(
hceylan 7.1 41
Raluca Stavro 14.1 42 1. click on the (% class="sectionblockcodecolored" %)CUSTOMIZE(%%) button right beside the (% class="sectionblockcodecolored" %)Skin(%%) property, to open the document
43 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
44 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(%%) )
45 1. save the document
46
47 ~)~)~)|~(~(~([[[image:2.png]>>attach:2.png]]~)~)~)
48
49 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" %)~(~(~(
50
51 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/ )
52 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
53 1. go into the (% class="sectionblockcodecolored" %)Presentation(%%) section
54 1. follow the steps 4, 5, 6 and 7 from inside the section [[[C-2>>||target="#3c2"]]]
55
56 ~)~)~)|~(~(~([[[image:3.png]>>attach:3.png]]~)~)~)
57
58 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:
59
60 1. go to the user's (% class="sectionblockcodecolored" %)profile(%%) page
61 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(%%))
62 1. set the value of the (% class="sectionblockcodecolored" %)skin(%%) property as being (% class="sectionblockcodecolored" %)toucan
63 1. save the document
64
65 Now, all the pages inside the instance will have the (% class="sectionblockcodecolored" %)toucan(%%) Skin applied on them for that user. {{info}}To learn more about XWiki Skins, check the [[Skins tutorial>>DevGuide.Skins]] from inside the XWiki Developer Guide.{{/info}}
66
67 == Useful tools ==
68
69 * [[Firebug>>http://www.getfirebug.com/]] is very useful for customizing quickly an XWiki skin
70 * On a Mac with OS X and Safari 4 the Web Console works similar to Firebug but it seems to be more precise when highlighting the space allocated by an element.

Get Connected