Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Line: 8 to 8 | ||||||||
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 skins. | |||||||
> > | 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. | |||||||
Major changes from the previous template system | ||||||||
Line: 26 to 26 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Deleted: | ||||||||
< < |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
New Template System by Example | ||||||||
Line: 45 to 44 | ||||||||
The first line declares the delimiter variable called "sep", used to separate multiple link items. The variable can be called anywhere by writing %TMPL:P{"sep"}% | ||||||||
Deleted: | ||||||||
< < | NOTE: Added a dot to escape rendering of variables, i.e. read %.WEB% as %WEB% . | |||||||
Added: | ||||||||
> > | ||||||||
Changed: | ||||||||
< < | <table border="1" cellspacing="0" cellpadding="1"> <tr><td> <verbatim> %.TMPL:DEF{"sep"}% | %.TMPL:END% | |||||||
> > | %TMPL:DEF{"sep"}% | %TMPL:END% | |||||||
<html> <head> | ||||||||
Changed: | ||||||||
< < | <title> %.WIKITOOLNAME% . %.WEB% . %.TOPIC% %.TMPL:P{"titleaction"}%</title> <base href="%.SCRIPTURL%/view%.SCRIPTSUFFIX%/%.WEB%/%.TOPIC%"> | |||||||
> > | <title> %WIKITOOLNAME% . %WEB% . %TOPIC% %.TMPL:P{"titleaction"}%</title> <base href="%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%"> | |||||||
<meta name="robots" content="noindex"> </head> <body bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="3" cellspacing="0"> <tr> | ||||||||
Changed: | ||||||||
< < | <td bgcolor="%.WEBBGCOLOR%" rowspan="2" valign="top" width="1%"> <a href="%.WIKIHOMEURL%"> <img src="%.PUBURLPATH%/wikiHome.gif" border="0"></a> | |||||||
> > | <td bgcolor="%WEBBGCOLOR%" rowspan="2" valign="top" width="1%"> <a href="%WIKIHOMEURL%"> <img src="%PUBURLPATH%/wikiHome.gif" border="0"></a> | |||||||
</td> <td> | ||||||||
Changed: | ||||||||
< < | <b>%.WIKITOOLNAME% . %.WEB% . </b><font size="+2"> <B>%.TOPIC%</b> %.TMPL:P{"titleaction"}%</font> | |||||||
> > | <b>%WIKITOOLNAME% . %WEB% . </b><font size="+2"> <B>%TOPIC%</b> %TMPL:P{"titleaction"}%</font> | |||||||
</td> </tr> | ||||||||
Changed: | ||||||||
< < | <tr bgcolor="%.WEBBGCOLOR%"> | |||||||
> > | <tr bgcolor="%WEBBGCOLOR%"> | |||||||
<td colspan="2"> | ||||||||
Changed: | ||||||||
< < | %.TMPL:P{"webaction"}% | |||||||
> > | %TMPL:P{"webaction"}% | |||||||
</td> </tr> </table> | ||||||||
Changed: | ||||||||
< < | ++ %.TMPL:P{"heading"}% %.TMPL:P{"message"}% | |||||||
> > | ++ %TMPL:P{"heading"}% %TMPL:P{"message"}% | |||||||
<table width="100%" border="0" cellpadding="3" cellspacing="0"> | ||||||||
Changed: | ||||||||
< < | <tr bgcolor="%.WEBBGCOLOR%"> | |||||||
> > | <tr bgcolor="%WEBBGCOLOR%"> | |||||||
<td valign="top"> | ||||||||
Changed: | ||||||||
< < | Topic <b>TWikiTemplates</b> . { %.TMPL:P{"topicaction"}% | |||||||
> > | Topic <b>%TOPIC%</b> . { %TMPL:P{"topicaction"}% | |||||||
} </td> </tr> </table> </body> | ||||||||
Deleted: | ||||||||
< < | </verbatim> </td></tr> </table > | |||||||
Added: | ||||||||
> > | ||||||||
Line: 103 to 98 | ||||||||
Changed: | ||||||||
< < | %.TMPL:DEF{"titleaction"}% (test =titleaction=) %.TMPL:END% %.TMPL:DEF{"webaction"}% test =webaction= %.TMPL:END% %.TMPL:DEF{"heading"}% Test heading %.TMPL:END% %.TMPL:DEF{"message"}% | |||||||
> > | %TMPL:DEF{"titleaction"}% (test =titleaction=) %TMPL:END% %TMPL:DEF{"webaction"}% test =webaction= %TMPL:END% %TMPL:DEF{"heading"}% Test heading %TMPL:END% %TMPL:DEF{"message"}% | |||||||
Test message . Blah blah blah blah blah blah blah blah blah blah blah...
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Test topicaction : | ||||||||
Changed: | ||||||||
< < | OK %.TMPL:P{"sep"}% Register %.TMPL:END% %.TMPL:INCLUDE{"oopsbase"}% | |||||||
> > | [[%WEB%.%TOPIC%][OK]] %TMPL:P{"sep"}% [[%TWIKIWEB%.TWikiRegistration][Register]] %TMPL:END% %TMPL:INCLUDE{"oopsbase"}% | |||||||
</table >
| ||||||||
Line: 135 to 130 | ||||||||
| ||||||||
Added: | ||||||||
> > | TWiki master template | |||||||
All common template parts are defined in one master template, twiki.tmpl , that all other templates include.
| ||||||||
Line: 146 to 143 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Example: preview.tmpl template | |||||||
> > | Example: oopspreview.tmpl template | |||||||
%TMPL:INCLUDE{"twiki"}% %TMPL:DEF{"titleaction"}% (oops) %TMPL:END% | ||||||||
Line: 163 to 160 | ||||||||
| ||||||||
Changed: | ||||||||
< < | -- PeterThoeny - 23 Jul 2001 | |||||||
> > | -- PeterThoeny - 23 Jul 2001 | |||||||
-- MikeMannix - 30 Aug 2001
|