A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx#2-11
---------------
For instance, template language would be useful for rendering an
invoice page, generating one row for each line item, and inserting
the description, quantity, price, and so on into the text for each
row. It would not be used to create the invoice record in a
database or to interact with a credit card processing facility.
% Anonymous User - Nov. 20, 2003 3:45 am:
I don't think this section is as clear as it could be.
.............................................
This is how I think TAL works (based on this tutorial and a few little experiments)
..............................................
TAL markup is always of the form:
tal:statement="value"
.............................................
EXAMPLE
If you create a plain text file named 'insertme' in the same directory as the Xope Page Template then stick:
tal:content="here/insertme" into the HTML <scan> tag, like this:
<scan tal:content="here/insertme">You shoudn't see this</scan>
Then what you will see once the page has been 'rendered' by Zope is simply the contents of the file
'insertme'
.............................................
1. The 'here' refers to the folder in which the template is located ???
2. This is how 'content' is kept seperate from 'presentation' ???
.............................................
I don't know if this makes anything more or less clear, or is just plain wrong.
.............................................
I think that if anybody re-writes this section they should include a few more examples.
% Anonymous User - Dec. 2, 2003 11:05 pm:
You are almost right. 'here' refers to the namespace in which the template is
currently being called, not necessarily where it's located. This is a subtle
(and often irrelevant) distinction which is explained in later chapters.
% Anonymous User - Feb. 13, 2004 5:05 pm:
I hope Anonymous User - Nov. 20, 2003 3:45 am meant the "span" tag and not the "scan" tag, because otherwise
I'm even more confused than I think I am.
_______________________________________________
ZDP maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zdp
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.