[Zope] Either I'm an Idiot or dtml-in is broken and/or poorly documented

Dan Shafer pydan@danshafer.com
Fri, 03 May 2002 13:53:41 -0700


I know lots of you use <dtml-in> to iterate over stuff. So I assume it 
works. But I am absolutely bewildered. I cannot get the simplest example of 
this function to work.

Here's my really difficult test, stored in a DTML document (opening angle 
brackets omitted):

dtml-var standard_html_header>
dtml-in objectValues>
   title: <dtml-var title_or_id><br>
/dtml-in
dtml-var standard_html_footer>

Call me goofy but I sort of expect this to produce a list of the titles or 
IDs of all the objects in the folder in which the DTML Document is stored.

It never produces any output whatsoever.

I put in a dtml-else that prints a heading "Nothing Found" and that always 
prints.

This is frustrating because as far as I can tell, I am following examples 
in all three of the Zope books I own to the letter, yet I cannot produce 
any output at all. Nothing. Nada. Zip.

I actually *need* to be able to iterate over all the DTML Methods and DTML 
Documents in this folder, check a property's value, and based on that value 
include or exclude the documents and their URLs from a table or list. As 
you can see, for reasons I just don't understand, I'm very far from that goal.

I've searched PQR, I've searched the online tips and HowTos.

What in the world could I be doing wrong here? I *have* placed this 
document in a folder which contains other objects: DTML documents and 
methods, Python scripts, and other folders. I have also tried substituting 
objectItems for objectValues. No joy. I've tried enclosing objectValues and 
objectItems in quotation marks and calling them as expressions. I've tried 
making the argument to objectValues and objectItems a one-item list with a 
string value. I am now officially lost and desperate.