Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...
View   r12  >  r11  >  r10  >  r9  >  r8  >  r7  ...
TWikiTemplates 12 - 18 Jul 2002 - Main.PeterThoeny
Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Line: 202 to 202
 

Sample screen shot of oopstest.tmpl

Changed:
<
<
With URL: .../bin/oops/Test/TestTopic2?template=oopstest&param1=WebHome&param2=WebNotify
>
>
With URL: .../bin/oops/Sandbox/TestTopic2?template=oopstest&param1=WebHome&param2=WebNotify
 
Changed:
<
<
testscreen.gif
>
>
testscreen.gif
 

Known Issues

Line: 214 to 214
 -- PeterThoeny - 23 Jul 2001
-- MikeMannix? - 14 Sep 2001
Changed:
<
<
META FILEATTACHMENT attr="h" comment="Example of oopstest.tmpl rendered" date="999598142" name="testscreen.gif" path="C:\02_TWikiDocs\testscreen.gif" size="9460" user="MikeMannix" version="1.1"
>
>
META FILEATTACHMENT attr="h" comment="Example of oopstest.tmpl rendered" date="1026977240" name="testscreen.gif" path="C:\Data\Temp\testscreen.gif" size="9566" user="PeterThoeny" version="1.2"
 
META TOPICMOVED by="MikeMannix" date="1000277381" from="TWiki.TWikiTemplateSystem" to="TWiki.TWikiTemplates"

TWikiTemplates 11 - 04 Dec 2001 - Main.PeterThoeny
Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Line: 205 to 205
 With URL: .../bin/oops/Test/TestTopic2?template=oopstest&param1=WebHome&param2=WebNotify

Changed:
<
<
testscreen.gif
>
>
testscreen.gif
 

Known Issues


TWikiTemplates 10 - 18 Sep 2001 - Main.MikeMannix
Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Line: 8 to 8
 

Overview

Changed:
<
<
The new modular template system offers flexible, easy control over the layout of all TWiki pages. The master template approach groups parts that are shared by several templates - like headers and footers - in a common file. Special variables allow individual layouts to include parts from a master template - variables are mixed with regular HTML mark-up for template-specific content.
>
>
The new modular template system offers flexible, easy control over the layout of all TWiki pages. The master template approach groups parts that are shared by several templates - like headers and footers - in a common file. Special variables allow individual layouts to include parts from a master template - variables are mixed with regular HTML mark-up for template-specific content. Templates are used to define page layout, and also to supplydefault content for new pages.
 

Major changes from the previous template system

Line: 54 to 54
 
  • HTML Page Templates: Defines layout of TWiki pages
  • Template Topics: Defines default text when you create a new topic
Added:
>
>
 

HTML Page Templates

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.

Line: 69 to 70
 Special variables are used in templates, especially in view, to display meta data.
Added:
>
>
 

Template Topics

Template topics define the default text for new topics. There are three types of template topics:


TWikiTemplates 9 - 16 Sep 2001 - Main.MikeMannix
Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Changed:
<
<

TWiki Template System

>
>

TWiki Templates

 Definition of the templates used to render all HTML pages displayed in TWiki

Overview

Changed:
<
<
The new modular template system is more flexible, efficient, and easily updated than the old set-up, where each template is a complete HTML file. The new master template approach places common templates parts, like headers and footers, in one shared file. This simplifies the conversion of templates into XHTML format, and provides a more versatile solution for templates and for TWikiSkins.
>
>
The new modular template system offers flexible, easy control over the layout of all TWiki pages. The master template approach groups parts that are shared by several templates - like headers and footers - in a common file. Special variables allow individual layouts to include parts from a master template - variables are mixed with regular HTML mark-up for template-specific content.
 

Major changes from the previous template system

Changed:
<
<
The main difference is that templates are now defined using variables to include template parts. You change one stored instance of a common element to update all occurrences. The new system:
>
>
Where the old templates were each complete HTML documents, the new templates are defined using variables to include template parts from a master file. You can now change one instance of a common element to update all occurrences; previously, every affected template had to be updated. This simplifies the conversion of templates into XHTML format, and provides a more versatile solution for templates and for TWikiSkins. The new system:
 
  • separates a set of common template parts into a base template that is included by all of the related templates;
Deleted:
<
<
 
  • defines common variables, like a standard separator (ex: "|"), in the base template;
Deleted:
<
<
 
  • defines variable text in the individual templates and passes it back to the base template.

Functional Specifications

Line: 34 to 32
 
  • Variables are live in a global name space, there is no parameter passing.
  • Two-pass processing, so that you can use a variable before declaring it or after.
  • Templates and TWikiSkins work transparently and interchangeably. For example, you can create a skin that overloads just the twiki.tmpl, like twiki.print.tmpl, that redefines the header and footer.
Changed:
<
<
  • Note: The template directives work only for templates, they do not get processed in topic text.
>
>
  • NOTE: The template directives work only for templates, they do not get processed in topic text.
 

TWiki Master Template


TWikiTemplates 8 - 15 Sep 2001 - Main.PeterThoeny
Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Line: 80 to 82
  All template topics are located in the TWiki web. The WebTopicEditTemplate can be overloaded. The following search order applies when you create a new topic:
Changed:
<
<
  1. The topic name specified by the templatetopic parameter.
>
>
  1. The topic name specified by the templatetopic CGI parameter.
 
  1. WebTopicEditTemplate in the current web.
  2. WebTopicEditTemplate in the TWiki web.
Line: 90 to 92
 
  • New example topic:
Changed:
<
<
(date format is YYYYMMDD)
>
>
(date format is YYYYxMMxDD)
 

Above form asks for a topic name. A hidden input tag of name "templatetopic" specifies the ExampleTopicTemplate as the template topic. Here is the HTML source of the form:

Line: 100 to 103
 
<form name="new" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/">
	* New example topic: 

Changed:
<
<
<input type="text" name="topic" value="ExampleTopic%SERVERTIME{$year$mo$day}%" size="22"> <input type="hidden" name="templatetopic" value="ExampleTopicTemplate"> <input type="hidden" name="onlywikiname" value="on"> <input type="submit" value="Create"> (date format is YYYYMMDD)
>
>
<input type="text" name="topic" value="ExampleTopic%SERVERTIME{$yearx$mox$day}%" size="23" /> <input type="hidden" name="templatetopic" value="ExampleTopicTemplate" /> <input type="hidden" name="onlywikiname" value="on" /> <input type="submit" value="Create" /> (date format is <nop>YYYYxMMxDD)
 </form>

Revision 12r12 - 18 Jul 2002 - 07:20:00 - PeterThoeny?
Revision 11r11 - 04 Dec 2001 - 10:21:53 - PeterThoeny?
Revision 10r10 - 18 Sep 2001 - 05:33:48 - MikeMannix?
Revision 9r9 - 16 Sep 2001 - 05:48:46 - MikeMannix?
Revision 8r8 - 15 Sep 2001 - 19:19:17 - PeterThoeny?
Revision 7r7 - 15 Sep 2001 - 09:32:57 - MikeMannix?
This site is powered by the TWiki collaboration platform.
All material on this collaboration platform is the property of the contributing authors.
All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4.
Syndicate this site RSSATOM