ca13c94a53b0a7770d3e5566493cc5d3da4b65cc
[openafs-wiki.git] / TWiki / TWikiSkins.mdwn
1 <div>
2   <ul>
3     <li><a href="#TWiki Skins"> TWiki Skins</a><ul>
4         <li><a href="#Overview"> Overview</a></li>
5         <li><a href="#Activating Skins"> Activating Skins</a></li>
6       </ul>
7     </li>
8   </ul>
9 </div>
10
11 # <a name="TWiki Skins"></a> TWiki Skins
12
13 _Overlay regular templates with alternate header/footer layouts_
14
15 ## <a name="Overview"></a> Overview
16
17 Skins are customized [[TWiki Templates|Main/TWikiDocumentation#TWiki_Template_System]] files. You can use skins to change the look of a %WIKITOOLNAME% topic, for example, the layout of the header and footer. Rendered text between header and footer does **_not_** change. You can also use skins to define an alternate view, like a view optimized for printing.
18
19 --++ Defining Skins
20
21 Skin files are located in the `twiki/templates` directory and are named with the syntax: <code>**&lt;scriptname&gt;.&lt;skin&gt;.tmpl**</code>. For example, the **Printable** skin for the `view` template is `view.print.tmpl`.
22
23 ## <a name="Activating Skins"></a> Activating Skins
24
25 A skin can be activated in two ways:
26
27 - Define the `SKIN` Preference variable in [[TWikiPreferences]], one of the [[WebPreferences]], or in a user - Main.admin - topic.
28   - `Set SKIN = print`
29
30 - Add `?skin=name` to the URL, for this example:
31   - <http://www.dementia.org/twiki//view/%WEB%/%TOPIC%?skin=print> (for the print view skin)
32   - <http://www.dementia.org/twiki//view/%WEB%/%TOPIC%?skin=plain> (for the plain view skin that has no header and footer)
33
34 The <code>**?skin=name**</code> URL parameter overrides the SKIN Preference value.
35
36 -- [[PeterThoeny]] - 14 Jul 2001 <br />