|
TWiki uses HTML template files for all actions like topic view, edit, preview and so on. This allows you to change the look and feel of all pages by editing just some template files.
The template files are in the twiki/templates directory. As an example, twiki/templates/view.tmpl is the template file for the twiki/bin/view script. Templates can be overloaded per web or per topic. The following search order applies:
-
twiki/templates/$webName/$scriptName.$topicName.tmpl
-
twiki/templates/$webName/$scriptName.tmpl
-
twiki/templates/$scriptName.$topicName.tmpl
-
twiki/templates/$scriptName.tmpl
Note: $webName is the name of the web ( i.e. Main ), $scriptName is the script ( i.e. view ), and $topicName is the topic name ( i.e. new ).
Being able to specify a per topic template gives you lots of flexibility to use 'normal' topics for special (systems) functions, especially with the inline search. Another example is a separate page for creating new topics; bin/edit/Test?topic=new uses edit.new.tmpl which could have an entry field for the new topic name in addition to the text box.
-- PeterFokkinga? - 15 May 2000
-- PeterThoeny? - 22 May 2000
|