[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Creating Basic Zope Applications
nobody@nowhere.com
nobody@nowhere.com
Wed, 28 Aug 2002 04:25:03 -0400
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/SimpleExamples.stx#3-20
---------------
Now, you need a front page that serves as the welcome screen
for Zoo visitors. Let's create a DTML Method in the *ZopeZoo* folder
called *index_html* with the following content::
<dtml-var standard_html_header>
<h1>Welcome to the Zope Zoo</h1>
<p>Here you will find all kinds of cool animals. You are in
the <b><dtml-var getId></b> section.</p>
<dtml-var standard_html_footer>
% twalter - Apr. 20, 2002 8:04 pm:
I know it is stated correctly here, but since I tripped, I would add comments to the effect that a DTML
Document called index_html will not work. It must be a DTML Method. (You can see my comments also in "Using
Basic Zope Objects" chapter, "Comparing DTML Documents and Methods" section. If it had been there, I probably
would not have needed anything here also.)
% Anonymous User - Apr. 27, 2002 11:22 pm:
Why a method - it looks like content - is index_html an exception to the doc v. method rule because it
attaches to the folder instead of creating a new file? (I'm guessing.)
% Anonymous User - May 27, 2002 12:17 am:
I didn't catch that either, until I hit it, couldn't figure it out, and read the above comment.
% Anonymous User - June 4, 2002 7:00 pm:
Just to confirm the earlier comment, I had to use a DTML Method to get it to work too.
% Anonymous User - June 14, 2002 11:01 pm:
Is it just me or does the fact that a dtml method is required and a document doesn't work a bit arbitrary? Maybe
I don't fully understand the semantics of dtml docs vs methods, but if there's an expert who can discuss that
at this point in the tutorial, it would likely be very useful.
% Anonymous User - June 21, 2002 5:46 am:
Well, it's just a question of namespaces.
objectValues() is [] when used in a DTML document -> a document is an object
that can properties and subobjects. In the case of a DTML document it can
only have properties.
objectValues() in a DTMLMethod lists all siblings of the method because a
Method is not a "Zope Object".
yacc
% Anonymous User - Aug. 28, 2002 4:25 am:
I do not understand the above explication: "a document is an object that can
(have) properties an subojects"(???) How can a document have subobjects?
The method "objectValues" belongs to class ObjectManager. How is this connected
to either DTML Document or DTML Method?