[Zope] Another Question

Evan Simpson evan@4-am.com
Fri, 03 Sep 1999 18:09:10 -0500


[cc:ed to list]
John Goerzen wrote:

> "Kevin Dangoor" <kid@kendermedia.com> writes:
>
> > <dtml-var standard_html_header>
> > <dtml-in "objectValues('Event')">
> >  <a href="<dtml-var id>"><dtml-var title></a>
> > </dtml-in>
> > </dtml-var standard_html_footer>
>
> Thanks for the great information!  I got everything going except the
> above code.  (Incidentally, where can I find a reference to functions
> like objectValues?)  I even tried changing Event to Folder (knowing
> that I do have a sub-folder in this one), but still it displayed
> nothing.  Any ideas?  I also tried objectValues(['Event']), I saw that
> syntax somewhere, but that didn't help.

My first guess is that you're using the code above in a DTML Document:  The
document contains nothing, so nothing is returned.  You need to either use a
DTML Method instead,  or explicitly call objectValues on the containing folder
(<dtml-in "myfolder.objectValues('Event')"> or <dtml-in
"PARENTS[1].objectValues('Event')>).

Note that objectValues('string') and objectValues(['string1', ...]) are both
valid.

> Incidentally, what is the difference between using single and double
> quotes, and when should each be used?

Double quotes are used by the dtml-tags to quote tag attribute values (such as a
Python expression).  Within double quotes, you must use single quotes.  Within
single quotes, you have to use backslashed single quotes.