Never mind! Sorry for wasteing the disk space I just stubbled across the syntax using my typical trial & error & errorr approach. If anyone is interested this is the resulting (very ugly and inefficient) code. This climbs up the folder tree and creates two lists. One in forward order the other in reverse. The reverse list is displayed as a navigator and the forward list is converted to string and used to query the catalog for items. If anyone has improvements ;) Thanks anyway, Chip <dtml-call "REQUEST.set('tkeysreverse', [])"> <dtml-call "REQUEST.set('tkeysforward', [])"> <dtml-call "REQUEST.set('Topic', '')"> <dtml-in PARENTS skip_unauthorized reverse> <dtml-unless sequence-start> <dtml-unless "id == 'PortalRoot' or id == 'Pub'"> <span class="ItemBack"> <dtml-with sequence-item> <dtml-call "tkeysreverse.insert(0, id)"> <dtml-call "tkeysforward.append(id)"> <a href="<dtml-var absolute_url>/showTopics"> <dtml-var id></a> </dtml-with> <dtml-unless sequence-end> > </dtml-unless> </span> </dtml-unless> </dtml-unless> </dtml-in> <dtml-call "REQUEST.set('Topic', _.string.join(tkeysforward))">
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Chip Vanek Sent: Wednesday, February 16, 2000 4:19 PM To: zope@zope.org Subject: [Zope] NEWBIE: DTML Appending string and passing in REQUEST?
Hi,,
Really simple question that I just cannot figure out.
I want to append items together and pass as form item to another method in REQUEST.
Well I can create an empty string in REQUEST with <dtml-call "REQUEST.set('list', [])">
I can then iterate and fill the list fine. <dtml-call "list.insert(0, id)">
Then I want the results of the list in one variable in another method. i.e.: I have a list ['item1','item2','last item'] and I want a string like "item1/item2/last item".
I know I can iterate through the list with dtml-in but what is the right join syntax?
<dtml-call _.string.join(list,' ')> doesn't get me anywere.
Thanks for your help
Chip
_______________________________________________ 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 )