Hi Jan Ulrich, I would use zcatalog to get an index of your DTML Documents, then get a list matching your requirements and use whrandom.choice() to get one of them at random. Regards Tino PS: its not neccesary to organize the files in folders like this. If you give them a property with date (or use bobobase_modification_time), you can even have them all in one (probably btree-) folder. --On Sonntag, 5. August 2001 16:01 +0200 Jan Ulrich Hasecke <juh@sudelbuch.de> wrote:
Hi,
I have 100 folders
1900 1901 ... 1999 2000
and in every folder there is a folder called "Texte". Inside this folder there are DTML Documents.
Then I have this Method
,----[ textliste ] | <dtml-in expr="Texte.objectValues()"> | | <p><a href="<dtml-var absolute_url>"><dtml-var title></a> | von <dtml-var autor></p> | | </dtml-in> `----
On a contentspage I call this method using dtml-with like this_
,----[ contents_dtml ] | <dtml-with 1900> | <dtml-var textliste> | </dtml-with> | | <dtml-with 1901> | <dtml-var textliste> | </dtml-with> | | and so on `----
Now a have two questions:
1. Is it possible to use something like
<dtml-with [1900-2000]>
to get all texts with one command.
2. How can I make a random textlist. I tried to do somethine like
<dtml-with randomline> <dtml-var textliste> </dtml-with>
where randomline is the Product from phd.
Is it possible to call dtml-with with a random value so that I get a list of a random folder?
TIA juh
-- Eine Weltbürgerin zieht aufs Land http://www.spiegel.de/netzwelt/netzkultur/0,1518,53445,00.html
_______________________________________________ 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 )