[Zope] Many Zope questions
Kevin Dangoor
kid@kendermedia.com
Fri, 3 Sep 1999 14:49:17 -0400
-----Original Message-----
From: John Goerzen <jgoerzen@complete.org>
To: Kevin Dangoor <kid@kendermedia.com>
Cc: zope@zope.org <zope@zope.org>
Date: Friday, September 03, 1999 2:29 PM
Subject: Re: [Zope] Many Zope questions
>"Kevin Dangoor" <kid@kendermedia.com> writes:
>> You would probably want to make the Quick Links bar a DTML Method. This
>> makes it easy to include it wherever you wish.
>>
>> <dtml-var quicklinks>
>
>Ah ha! So any object (or at least documents and methods) can act as a
>variable? Neat!
The var tag actually renders whatever it is that you pass. It can render
properties, DTML methods, External Methods written in Python, etc.
>Question: How does <!--#var quicklinks> (as is found in the
>documentation) differ from <dtml-var quicklinks>? When should each be
>used?
I should have mentioned... Almost all of the existing doc uses the Zope 1.x
syntax of <!--#tag -->
This syntax is still legal, but <dtml-tag > is becoming the more preferred
way of doing things.
>While discussing variables, how does typing in Zope work? I know that
>properties have types. What I want to do is read in a date from a
>user with an input form and then compare that to, for instance, a date
>in a Gadfly database -- or even just an arbitrary date. How can I
>tell Zope (or Gadfly) that it's dealing with a date? I didn't seem to
>find any casting operators around anywhere.
Zope knows what types objects are. For example, if you do:
<dtml-var "someDateProperty + 5" fmt="%m/%d/%y">
you will get the date five days later than the date stored in the property.
Likewise, if you do:
<dtml-var "someDateProperty + 'foo'">
I believe you'll get an error. (not sure what adding a string to a date
would mean :)
>> If you do really want it in Zope, you could use XML-RPC or ZClient to
update
>> things via cron.
>
>Where can I find documentation on these?
This is a fine question. I often look at the source code when I'm curious
about something and can't find docs on that specific topic. The Zope source
is very readable.
Kevin