[Zope] referencing title value as a var name

Hamzat kamal hamzatk@dnetsystems.net
Mon, 13 Aug 2001 16:09:24 +0200


Goodday,

My first question is that is it possible to store the title value of an
object with <dtml-let> and later reference it  with <dtml-if > in another
object?
if it is possible, pls furnish me with the deatils. Else i think i better
explain what i actually have in mind.

What i wanted is to list the titles of all the dtml documents in a folder,
set the hyperlink of each dtml document to its id and finally store the
value of the clicked title in a variable name. I think I am able to scale
through this, but my problem now is to reference that variable name in
another object. 


Below is the code i used to iterate and store the title value; this code is
on one object called content_html:

<ul>
<dtml-in "objectValues(['DTML Document'])" sort=title>
<li>
<a href="&dtml-id;/">&dtml-title;
<dtml-let dname="_['sequence-var-title']">
</dtml-let>
</a>
</li>
</dtml-in>
</ul>

Below here is where i am having a problem, the code here is on another
object called index_html but both content_html and index_html are in the
same folder.

<dtml-let dday=dname>
<dtml-if expr="dday[0:6]=='Saturd'">
<dtml-var saturday2>
<dtml-elif expr="dday[0:6]=='Friday'">
<dtml-var friday2>
<dtml-elif expr="dday[0:6]=='Sunday'">
<dtml-var sunday2>
<dtml-else>
<dtml-var table2>
</dtml-if>
</dtml-let>

Help in any form will be highly appreciated.

Thanks.

kamal.