summaryrefslogtreecommitdiff
path: root/TWiki
diff options
context:
space:
mode:
authorMikeMannix <MikeMannix>2001-09-07 10:07:14 +0000
committerMikeMannix <MikeMannix>2001-09-07 10:07:14 +0000
commit3af77e1afbcdaa273cca76c396470d2d2d57d9ab (patch)
treea1ad1fba573e5e5ccdf1bf1e6a0cc0d34109ea86 /TWiki
parentffc2275130f7651a47a76d035f4c0cf330b9b449 (diff)
none
Diffstat (limited to 'TWiki')
-rw-r--r--TWiki/TWikiTemplates.mdwn18
1 files changed, 9 insertions, 9 deletions
diff --git a/TWiki/TWikiTemplates.mdwn b/TWiki/TWikiTemplates.mdwn
index fdfb3d71..2537761a 100644
--- a/TWiki/TWikiTemplates.mdwn
+++ b/TWiki/TWikiTemplates.mdwn
@@ -6,23 +6,23 @@ see also for ref: orig [[TWikiTemplatingSystem]] %TOC%
%STARTINCLUDE%
-## <a name="TWiki_Template_System"> TWiki Template System </a>
+# <a name="TWiki_Template_System"> TWiki Template System </a>
_Define the templates used to render all HTML pages displayed in TWiki_
-### <a name="Overview"> Overview </a>
+# <a name="Overview"> Overview </a>
We have a need for more advanced template handling. As [[Main/JohnTalintyre]] pointed out in [[CommonHeaderFooterTemplate]] it makes sense to separate the header and footer into one file so that it can be easily altered (or even overloaded by a skin). Also the oops dialog messages are all identical except for a few variables like heading, and so on.
Using external modules like the [[TemplateToolkit]] would be one way to go, but this will add a lot of baggage to TWiki.
-### <a name="Needs_of_the_TWiki_templating_sy"> Needs of the TWiki templating system </a>
+## <a name="Needs_of_the_TWiki_templating_sy"> Needs of the TWiki templating system </a>
* Separate common parts into one (or more) base template file(s) and include that from other template files like `view.tmpl`.
* Define common variables like a "|" separator in the base template and use them in other template files
* Define variable text in templates (i.e. `view.tmpl`) and pass them to the base template
-### <a name="Functional_Spec"> Functional Spec </a>
+## <a name="Functional_Spec"> Functional Spec </a>
I tried to define a simple but powerful solution that can be extended over time. Here we go:
@@ -41,11 +41,11 @@ I tried to define a simple but powerful solution that can be extended over time.
* Templates and skins work transparently and interchangeably. You could for example define a new skin just for the header &amp; footer and keep the other template files unchanged.
* **_Note:_** The template directive work only for templates, they do not get processed in topic text.
-### <a name="Examples"> Examples </a>
+## <a name="Examples"> Examples </a>
Attached is an example of an oops base template `oopsbase.tmpl` and a example oops dialog `oopstest.tmpl` which is based on the base template. This is not the version that will go into the release, it is just a quick hack.
-##### <a name="Base_template_oopsbase_tmpl"> Base template oopsbase.tmpl </a>
+#### <a name="Base_template_oopsbase_tmpl"> Base template oopsbase.tmpl </a>
The first line declares the delimiter variable called "sep", used to separate multiple link items. The variable can be called anywhere by writing <code>%TMPL:P\{"sep"\}%</code>
@@ -95,7 +95,7 @@ The first line declares the delimiter variable called "sep", used to separate mu
</td></tr>
</table >
-##### <a name="Test_template_oopstest_tmpl"> Test template oopstest.tmpl </a>
+#### <a name="Test_template_oopstest_tmpl"> Test template oopstest.tmpl </a>
Each oops template basically just defines some variables and includes the base template that does the layout work.
@@ -124,7 +124,7 @@ Test =topicaction=:
</tr>
</table>
-##### <a name="Sample_screen_shot_of_oopstest_t"> Sample screen shot of oopstest.tmpl </a>
+#### <a name="Sample_screen_shot_of_oopstest_t"> Sample screen shot of oopstest.tmpl </a>
With URL: <code>**.../bin/oops/Test/TestTopic2?template=oopstest&amp;param1=WebHome&amp;param2=WebNotify**</code>
@@ -134,7 +134,7 @@ With URL: <code>**.../bin/oops/Test/TestTopic2?template=oopstest&amp;param1=WebH
</tr>
</table>
-### <a name="Comments_and_feedback"> Comments and feedback </a>
+## <a name="Comments_and_feedback"> Comments and feedback </a>
* The itching factor to put this into the upcoming release is to easy the pending converstion of the templates into XHTML format and to have a more flexible solution for templates and skins.
* Is the terminology OK?