Displaying list of documents in sub-folders?
Hello, I'm still a newbie at Zope, so please bear with me as I read through the Zope Book and experiment... In the main page, I'd like to have a index_html DTML Method object display a list of documents that are located in sub-folders, eg. computers/, news/ The following doesn't work: <dtml-in expr="objectValues('computers/DTML Document')"> <tr> <td><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></td> </tr> </dtml-in> Should I use a Python Script object instead? Any tip much appreciated Eddie.
try <dtml-in expr="computers.objectValues('DTML Document')"> and read the documentation of the ObjectManager ;-) -aj ----- Original Message ----- From: "EvH" <edward_van_h@bigfoot.com> To: <zope@zope.org> Sent: Monday, April 29, 2002 06:11 Subject: [Zope] Displaying list of documents in sub-folders?
Hello,
I'm still a newbie at Zope, so please bear with me as I read through the Zope Book and experiment...
In the main page, I'd like to have a index_html DTML Method object display a list of documents that are located in sub-folders, eg. computers/, news/
The following doesn't work:
<dtml-in expr="objectValues('computers/DTML Document')"> <tr> <td><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></td> </tr> </dtml-in>
Should I use a Python Script object instead?
Any tip much appreciated Eddie.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
EvH wrote:
Hello,
I'm still a newbie at Zope, so please bear with me as I read through the Zope Book and experiment...
In the main page, I'd like to have a index_html DTML Method object display a list of documents that are located in sub-folders, eg. computers/, news/
The following doesn't work:
<dtml-in expr="objectValues('computers/DTML Document')"> <tr> <td><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></td> </tr> </dtml-in>
Should I use a Python Script object instead?
from the top of my head: <dtml-in "objectValues('Folder')"> <dtml-in "_['sequence-item'].objectValues('DTML Document')"> means, 1) in all folders 2) in all their Documents http://www.zope.org/Documentation/ZopeBook/AppendixB.stx class ObjectManager, method objectValues() objectValues(type=None) This method returns a sequence of contained objects. Like objectItems and objectIds, it accepts one argument, either a string or a list to restrict the results to objects of a given meta_type or set of meta_types. -- ------------------------------------------------------------- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
participants (3)
-
Andreas Jung -
EvH -
hans