[Templates-cvs] cvs commit: Template2/docsrc/src/FAQ FAQ.tt2
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 06/02/02 16:34:18
Modified: docsrc/src/FAQ FAQ.tt2
Log:
new docs
Revision Changes Path
1.12 +7 -3 Template2/docsrc/src/FAQ/FAQ.tt2
Index: FAQ.tt2
===================================================================
RCS file: /template-toolkit/Template2/docsrc/src/FAQ/FAQ.tt2,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- FAQ.tt2 2006/02/01 10:54:35 1.11
+++ FAQ.tt2 2006/02/02 16:34:18 1.12
@@ -195,29 +195,35 @@
So even if you call [% INCLUDE header %], and that calls [% INCLUDE menu %],
the C<template> variable will be unchanged.
-index.html
+index.html:
+
[% template.name %] # index.html
[% INCLUDE header %]
header:
+
[% template.name %] # index.html
[% INCLUDE menu %]
menu:
+
[% template.name %] # index.html
In constrast, the C<component> variable always references the I<current>
template being processed.
index.html
+
[% component.name %] # index.html
[% INCLUDE header %]
header:
+
[% component.name %] # header
[% INCLUDE menu %]
menu:
+
[% component.name %] # menu
=head2 How do I print the modification time of the template or component?
@@ -308,6 +314,4 @@
This illustrates the basic principal but you can extend it to perform
pretty much any kind of per-document initialisation that you require.
-
-