Difference: TWikiSkins (18 vs. 19)

Revision 1913 Jan 2007 - Main.TWikiContributor

Line: 1 to 1
Deleted:
<
<
 
Changed:
<
<

TWiki Skins

>
>

TWiki Skins

  Skins overlay regular templates to give different looks and feels to TWiki screens.
Added:
>
>
 

Overview

TWiki uses TWikiTemplates files as the basis of all the screens it uses to interact with users. Each screen has an associated template file that contains the basic layout of the screen. This is then filled in by the code to generate what you see in the browser.

Changed:
<
<
TWiki ships with a default set of template files that give a basic look-and-feel. TWiki also includes support for skins that can be selected to give different, more sophisticated, look and feels. A default TWiki installation will usually start up with the PatternSkin already selected. Skins may also be defined by third parties and loaded into a TWiki installation to give more options. To see how TWiki looks when no skin is selected, view this topic with a non-existant skin.
>
>
TWiki ships with a default set of template files that give a very basic, CSS-themable, look-and-feel. TWiki also includes support for skins that can be selected to give different, more sophisticated, look and feels. A default TWiki installation will usually start up with the PatternSkin already selected. Skins may also be defined by third parties and loaded into a TWiki installation to give more options. To see how TWiki looks when no skin is selected, view this topic with a non-existant skin.
  Topic text is not affected by the choice of skin, though a skin can be defined to use a CSS (Cascading Style Sheet), which can sometimes give a radically different appearance to the text.
Line: 24 to 25
 

Changing the default TWiki skin

Changed:
<
<
TWiki default ships with the skin PatternSkin activated. If you want to modify the layout, colors or even the templates to suit your own needs, have a look first at the topics PatternSkinCustomization and PatternSkinCssCookbook.
>
>
TWiki default ships with the skin PatternSkin activated. You can set the skin for the whole site, a single web or topic, or for each user individually, by setting the SKIN variable to the name of a skin. If the skin you select doesn't exist, then TWiki will pick up the default templates.
 

Defining Skins

Changed:
<
<
You may want to define your own skin, for example to comply with corporate web guidelines, or because you have a aesthetic vision that you want to share.
>
>
You may want to define your own skin, for example to comply with corporate web guidelines, or because you have a aesthetic vision that you want to share. There are a couple of places you an start doing this.
  The TWikiTemplates files used for skins are located in the twiki/templates directory and are named according to the skin: <scriptname>.<skin>.tmpl. Skin files may also be defined in TWiki topics - see TWikiTemplates for details.

To start creating a new skin, copy the default TWikiTemplates (like view.tmpl), or copy an existing skin to use as a base for your own skin. You should only need to copy the files you intend to customise, as TWiki can be configured to fall back to another skin if a template is not defined in your skin. Name the files as described above (for example view.myskin.tmpl.

Changed:
<
<
For your own TWiki skin you are encouraged to show a small 80x31 pixel This site is powered by the TWiki collaboration platform logo at the bottom of your skin:
>
>
If you use PatternSkin as your starting point, and you want to modify the layout, colors or even the templates to suit your own needs, have a look first at the topics PatternSkinCustomization and PatternSkinCssCookbook.

For your own TWiki skin you are encouraged to show a small 80x31 pixel This site is powered by the TWiki collaboration platform logo at the bottom of your skin:

 
Changed:
<
<
<a href="http://twiki.org/"><img src="%PUBURL%/%TWIKIWEB%/TWikiLogos/T-logo-80x15.gif" alt="This site is powered by the TWiki collaboration platform" width="80" height="15" title="This site is powered by the TWiki collaboration platform" border="0" /></a>
>
>
<a href="http://twiki.org/"><img src="%PUBURL%/%SYSTEMWEB%/TWikiLogos/T-logo-80x15.gif" alt="This site is powered by the TWiki collaboration platform" width="80" height="15" title="This site is powered by the TWiki collaboration platform" border="0" /></a>
  The standard TWiki skins show the logo in the %WEBCOPYRIGHT% variable.
Line: 101 to 104
  and then set SKIN=yourlocal,pattern.
Changed:
<
<
Because ClassicSkin and the default templates use the same Template definition names, you can over-ride the edit links in them (or any skin derived from them) using the same view.yourlocal.tmpl (just set SKIN=yourlocal,classic either in TWikiPreferences for globally, or a Web's Webname.WebPreferences for a particular web)
>
>
Because ClassicSkin and the default templates use the same Template definition names, you can over-ride the edit links in them (or any skin derived from them) using the same view.yourlocal.tmpl (just set SKIN=yourlocal,classic either in TWikiPreferences for globally, or a Web's Webname.WebPreferences for a particular web)
 

Variables in Skins

Line: 151 to 154
 
Changed:
<
<
>
>
 
Line: 173 to 176
 
  • To see how CSS is used in the default TWiki skin, see: PatternSkin
  • If you write a complete new skin, this is the syntax to use in a template file:
Changed:
<
<
>
>
 

Attachment Tables

Line: 196 to 199
  The ATTACH:row macros are expanded for each file in the attachment table, using the following special tags:
Tag Description
Changed:
<
<
%A_URL% URL that will recover the file
>
>
%A_URL% viewfile URL that will recover the file
 
%A_REV% Revision of this file
%A_ICON% A file icon suitable for representing the attachment content
Changed:
<
<
%A_FILE% The name of the file
>
>
%A_FILE% The name of the file. To get the 'pub' url of the file, use %PUBURL%/%WEB%/%TOPIC%/%A_FILE%
 
%A_SIZE% The size of the file
%A_DATE% The date the file was uploaded
%A_USER% The user who uploaded it
 
This site is powered by the TWiki collaboration platformCopyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiSkins