[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Appendix C:
Zope Page Templates Reference
webmaster at zope.org
webmaster at zope.org
Wed Apr 14 10:17:17 EDT 2004
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx#1-0
---------------
Zope Page Templates are an HTML/XML generation tool. This appendix
is a reference to Zope Page Templates standards: Tag Attribute
Language (TAL), TAL Expression Syntax (TALES), and Macro Expansion
TAL (METAL). It also describes some ZPT-specific behaviors that are
not part of the standards.
% Anonymous User - Oct. 31, 2003 3:29 pm:
.
% snell - Nov. 15, 2003 5:20 am:
There is no reference to metal:block
in:
Zope Page Templates Reference
Page Templates
Advanced Page Templates
What is it for?
% Anonymous User - Nov. 23, 2003 3:01 pm:
tal:block or metal:block can be used on tag-level
if you have no html-tag to put your tal/metal code on.
% Anonymous User - Nov. 23, 2003 3:02 pm:
for instance, outside of the html-tag.
% Anonymous User - Apr. 14, 2004 10:17 am:
I have found a tal function that is never used or described in any of these pages or the WWW after a search
on 5 searchpages. Except in a subproduct for Zope (Plone) (but they don't explain tal usage on their site so
I'll ask it here)
<tal:datetime define="today python:DateTime().earliestTime()">
...
</tal:datetime>
First thing that intrigues me: There is no standard html tag around this tal, I tought only tal:block could
do that?
Second thing I noticed: All the code that remained between those tags (represented by "...") appeared in the
resulting page without problem, but there remained nothing visible of these "tal:datetime" tags.
Third thing I noticed: straight after the tal:datetime statement comes define="...", clearly working as the
tal:define explained later in this apendix. Why has there been no need to write "tal:" in front of it?
Is this some faulty page template code, yet still beeing accepted by the browser?
Could this code have been replaced by a simple <tal:block tal:define="..."> ... </tal:block> or <span
tal:omit-tag tal:define="..."> ... </span>?
Or is there a possibility to extend the tal-statements and why isn't it told here then?
More information about the ZDP
mailing list