[Zope] NEWBIE: dtml-in and subobjects

geoff@northernwastes.org geoff@northernwastes.org
Sun, 19 Mar 2000 17:20:33 -0900


Quoting sam <linuxcraft@redspice.com>:

> Have you tried
> <dtml-with containerObject>
> <dtml-in "objectValues('whatever class name')">
> I have not tried this myself but suspect is what you
need


Hmmm.  Tried that, but still no luck.  Zope give me a
NameError, and tells me method is trying to reference a
nonexistent variable (fullname).  Here's the current
draft of my code:

<table>
  <tr>
    <th>Name</th>
    <th>Description</th>
  </tr>
  <dtml-with bwlib_abilities>
    <dtml-in "fullname('AbilityClass')">
      <tr>
        <td><dtml-var fullname></td>
        <td><dtml-var description></td>
      </tr>
    </dtml-in>
  </dtml-with>
</table>

Where bwlib_abilities is the name my container class,
AbilityClass is the subclass in question, fullname is
the sorting criterea and a poperty of AbilityClass, and
description is also a property of that subclass.

I know I'm hanging on something silly here, but I can't
for the life of myself figure out what it might be.

Also (as a more general sort of question):

Is this way of organizing data (ie, a bunch 'o
subclasses in a container class) a reasonable way to
deal with lists (50 to 100 items) of quasi-dynamic
objects?  I'm from more of a more traditional database
background, and am used to putting this sort of info in
a table.  But in the case of this particular app, ZODB
seems idea since it provides several less technical
users of the app a ready-made interface to these objects
and I don't really need access to this data outside of
this single app.  But there seems like an almost
daunting amount of flexibility in the way I might
organize this data -- objects in folders, subobjects in
container objects, zcatalogs, etc.

Thanks,

//glw