[Zope] Instantiate dynamically an <dtml-in> attribute ?

FR Chalaoux frchalaoux@wanadoo.fr
Wed, 10 Apr 2002 23:30:52 +0200


RE,

Cool, I found a solution for the reverse in C:\Program
Files\zope5.0\lib\python\OFS\dtml\main.dtml and the code adpated code is :

<dtml-var standard_html_header>

<dtml-unless zoro><dtml-call expr="REQUEST.set('zoro', 'id')"></dtml-unless>
<dtml-unless rev><dtml-call expr="REQUEST.set('rev', '')"></dtml-unless>

<h1><dtml-var title_or_id></h1>
Date Courante : <dtml-var "ZopeTime()" fmt="%Y/%m/%d"><br><br>
<a href="add_html">Add New Entry</a><br>
<a href="search_html">Search Form</a><br><br>
<table border="1">
<tr>
<th><a href="sujet_html">Sujet</a></th>
<th><a href="realisateurs_html">Nom</a></th>
<th><a href="deadline_html">Dead line</a></th>
<th><a href="state_html?zoro=state<dtml-if
   "rev == ''">&rev=state</dtml-if>">Etat</a></th>
<th><a href="priorite_html">Priorite</a></th>
<th><a href="rubrique_html">Rubrique</a></th>
</tr>

<dtml-in entryValues sort_expr="zoro" reverse_expr="rev">
<tr>

...


Bye, FR

-----Message d'origine-----
De : Casey Duncan [mailto:casey@zope.com]
Envoye : jeudi 11 avril 2002 00:44
A : FR Chalaoux
Cc : zope@zope.org
Objet : Re: [Zope] Instantiate dynamically an <dtml-in> attribute ?


If you are actually putting those quotes in your URL, then that is the
problem.

-Casey

FR Chalaoux wrote:
> Hi and thanks,
>
> Excuse me for my bad explanation. In fact, In use metapublisher and when I
> want to retrieve the records, I use normally <dtml-in entryValues
> sort="title"> where title is a field name from my records.
>
> However, I would like to sort these records dynamically upon the user
choice
> made with links. Example of one link :
> http://localhost:8080/test/taskmanager/index_html?skey='title'
>
> Unfortunately, it does not work if I code as <dtml-in entryValues
sort=skey>
> or <dtml-in entryValues sort_expr=skey>
>
> any solution ?
>
> FR
>
> -----Message d'origine-----
> De : Casey Duncan [mailto:casey@zope.com]
> Envoye : mercredi 10 avril 2002 21:19
> A : FR Chalaoux
> Cc : zope@zope.org
> Objet : Re: [Zope] Instantiate dynamically an <dtml-in> attribute ?
>
>
> You can use sort_expr to pass the name(s) to sort on dynamically. ie:
>
> <dtml-in objectValues sort_expr="REQUEST.sort">
> ...
> </dtml-in>
>
> hth,
>
> -Casey
>
> FR Chalaoux wrote:
>
>>Hi,
>>
>>How is is possible, in dtml, to instantiate an <dtml-in> attribute
>>dynamically ?
>>
>>Ex: <dtml-in ObjectValues sort=<a dynamic attribute name of ObjectValues>
>>
>>
>>FR
>>
>>
>>
>>
>>_______________________________________________
>>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 )
>>
>>
>>
>
>
>
>