XWiki.com

Search:

The best way to share information, build online
communities and web applications.
Language: | fr
The FAQ has moved to http://www.xwiki.org/xwiki/bin/view/FAQ/

Document HowToCreateASkin

question How to create a skin ?

answer This is the start of an explanation on how to create a skin for XWiki. If you don't know what a skin is, check out What Is A Skin.

To create a skin, you need to have notions of one or more of:

With a skin, you can change (and therefore break) the layout of everything in XWiki.

Usually you just want to change the basic layout of XWiki, and therefore you need to modify:

  • the main styles file: style.css
  • the header template: header.vm
  • the footer template: footer.vm
  • the main logo
To do this you need to:
  • Create an empty page
  • Attach any images needed in the skin to this page
  • Select "Edit Objects" in the "More actions" menu
  • Add the objects from the class "XWiki.XWikiSkins"
  • Modify the style.css (overriding standard rules)
  • Modify header.vm and footer.vm content
You will find the original content at: To start, the best is to copy-paste the original content and make a slight modification.

If you want to derive your skin from another skin, you should write the name of the skin to derive in the "baseskin" textfield at the bottom of the page.

It is possible to modify the other templates. To do so you need to edit the XWiki.XWikiSkins class (using the Class Editor) and add a TextArea field that has the name of the template (for instance if you want to modify viewheader.vm which takes care of the action bar at the top, you need to create a TextArea field named viewheader.vm)

Once you have make some modifications, you can test your skin by adding the "skin=Main.MySkinPage" at the end of the URL. For example if you are creating a skin on xwiki.com, you can test the skin on the Home Page at http://www.xwiki.com/xwiki/bin/view/Main/WebHome?skin=Main.MySkinPage

Finally, when you are really happy with your skin, you can apply the skin to the whole wiki or to a space by modifying the "skin" field in the XWiki or Web Preferences. You should also modify the default and alternative styles (If you haven't created alternative styles, put 'style.css' in both fields)


 
Comments: 5 Comments by Turmeric Talks ...
 
 
Copyright 2004-2006 (c) XWiki.com
Powered by XWiki