[Zope] OOPS: [Zope] NEWBIE: DTML Appending string and passing in REQUEST?

Roddy rvagg@grug.une.edu.au
Thu, 17 Feb 2000 13:10:48 +1100 (EST)


Hye thanks Chip, this is the kind of thing that should be in a HOW-TO
(DTML tutorial actually), it begins to solve my problems quite nicely.
One of the things that bug me with the DTML tutorial thing in the
documentation section of zope.org is that it's so bare of example code, it
gives information but it's really hard to put together! Especially not
being a python person.
 -- Roddy

=> <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>
=>          &nbsp;&gt;&nbsp;
=>       </dtml-unless>
=>      </span>
=>   </dtml-unless>
=>   </dtml-unless>
=> </dtml-in>
=> <dtml-call "REQUEST.set('Topic', _.string.join(tkeysforward))">

---
Roddy Vagg
Programmer, Web Developer
Cooperative Research Centre for Cattle and Beef Quality
(and) Total Genetic Resource Management (TGRM)
Ph: (+61)267733978
---