Wiki source code of Skins

Version 47.2 by Lucas Charpentier (Sereza7) on 2024/11/28

Hide last authors
Guillaume Delhumeau 41.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
Vincent Massol 1.1 4
Vincent Massol 45.3 5 A skin is a visual organization of content for wiki pages. It's different from [[Color Themes>>extensions:Extension.Flamingo Theme Application]] which are set of colors for the various elements of a skin. Note that a given skin must support Color Themes to use them.
Vincent Massol 1.1 6
Ecaterina Moraru (Valica) 42.1 7 = Skins in XWiki =
Raluca Stavro 19.1 8
Ecaterina Moraru (Valica) 42.1 9 The latest version of XWiki bundles the following skins by default:
Vincent Massol 28.1 10
11 {{velocity}}
Thomas Mortagne 28.4 12 #set ($xwql = "from doc.object(ExtensionCode.ExtensionClass) as extension, doc.object(EXOExtensionCode.ExtensionClass) as exoextension where extension.type = 'skin' and exoextension.bundledWith like '%enterprise%'")
Vincent Massol 28.1 13 #set ($currentDb = $context.database)
Thomas Mortagne 32.1 14 #set ($dummy = $context.setDatabase("extensions"))
15 #set ($extensions = $services.query.xwql($xwql).execute())
Vincent Massol 28.1 16 #foreach ($extension in $extensions)
17 * [[${context.database}:$extension]]
18 #end
19 #set ($dummy = $context.setDatabase($currentDb))
20 {{/velocity}}
21
Vincent Massol 40.4 22 You can find the full list of existing skins on the [[Extensions wiki>>extensions:Extension.WebHome]].
23
Vincent Massol 28.1 24
Lucas Charpentier (Sereza7) 47.2 25 = Changing the Skin =
26
27 A skin can be changed at different levels:
28
29 * For the whole wiki
30 * For a given space
31 * For a given user
32
33 In order to change the skin at wiki and space level, the user has to be an administrator for the current XWiki instance. To find more about how to change a skin, check the [[Changing the Skin>>Documentation.AdminGuide.Skins#HChangingtheSkin]] section in the Admin Guide.
34
35 = More about XWiki Skins =
36
37 * Learn how to [[manage XWiki skins>>Documentation.AdminGuide.Skins]]
38 * Learn how to [[develop new skins>>Documentation.DevGuide.Tutorials.Skins]]
39
40 = Skins Extensions =
41
42 **Skins extensions** (or, abbreviated **SX**) are an alternative for developers who want to modify the layout and behavior of certain or all documents in their wiki without the need of changing its skin templates and/or stylesheets. The Skin extensions mechanism, available in all versions of XWiki superior to 1.5, provide the developers with the possibility of pulling extra stylesheets and Javascript files that are not bundled with the skin. You can find out more about Skin Extensions by reading the [[Skin Extensions Tutorial>>Documentation.DevGuide.Tutorials.SkinExtensionsTutorial]] in the Developer Guide.
43
44 = Examples =
45
Vincent Massol 45.2 46 Some Skins developed by the XWiki dev team (see [[more>>http://extensions.xwiki.org/xwiki/bin/view/ExtensionCode/AllExtensions/#|t=extensions&p=1&l=30&s=doc.creationDate&d=desc&category=skin]]):
Vincent Massol 28.1 47
Vincent Massol 43.1 48 [[[[image:extensions:Extension.Flamingo Skin@flamingo.png||width="100" style="width: 100px; height: 100px; border: 1px; border-color: #000000; border-style: solid;"]]>>extensions:Extension.Flamingo Skin]] [[[[image:Colibri.png||width="100" style="width: 100px; height: 100px; border: 1px; border-color: #000000; border-style: solid;"]]>>extensions:Extension.Colibri Skin]] [[[[image:Toucan.png||width="100" style="width: 100px; height: 100px; border: 1px; border-color: #000000; border-style: solid;"]]>>extensions:Extension.Toucan Skin]]
Vincent Massol 28.1 49
Vincent Massol 43.2 50 Some Custom skins developed by XWiki users:
Vincent Massol 28.1 51
Vincent Massol 43.1 52 {{cache}}
53 {{velocity}}
54 #set ($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.ReferenceClass' and obj.name<>'XWiki.ReferenceClassTemplate' order by doc.name asc")
55 #set ($references= $xwiki.searchDocuments($sql))
56 ##
57 #foreach ($reference in $references)
58 #set ($refDoc = $xwiki.getDocument($reference))
59 #if ($refDoc.attachmentList.size() > 0)
60 #set ($attach = $refDoc.attachmentList.get(0))
61 [[[[image:${refDoc.prefixedFullName}@${attach.filename}||width='100' style='width: 100px; height: 100px; border: 1px; border-color: #000000; border-style: solid;']]>>$refDoc.prefixedFullName]] #end
62 ## The end of the 'if' is located on the same line as the last statement because it would otherwise trigger a newline and the parser would output an unwanted <br/> element, resulting in one image per line.
63 #end
64 {{/velocity}}
65 {{/cache}}

Get Connected