[Zope] Variable substitution of <dtml-in> Attributes

Milos Prudek milos.prudek@tiscali.cz
Tue, 06 Nov 2001 20:49:55 +0100


> This is definitely not possible with the current dtml-in tag.
> The dtml-tag does not provide "reverse_expr=", "sort_expr=", and so forth
> (like to the dtml-tree tag).

On the contrary, you can use sort_expr with dtml-in.

Look at the following method:

<dtml-unless sort_by>
   <dtml-call "REQUEST.set('sort_by','title')">
</dtml-unless>
<dtml-in Catalog_Org size=50 start=query_start sort_expr="sort_by">
   <dtml-if sequence-start>

      <dtml-if previous-sequence>
...
...
...
     <table width="95%">
        <tr valign="top"> 
           <td><b>Name<br><img src="/img/sp_white.gif" width="1"
height="6"></b></td>
           <td><b><a
href="org_list?sort_by=title&facility_type=&dtml-facility_type;&org_type=&dtml-org_type;">Organisation
                <dtml-if "sort_by=='title'">
                    <img src="/img/arrow_down" border="0">
                </dtml-if>
                </a></b></td>
           <td><b><a
href="org_list?sort_by=city&facility_type=&dtml-facility_type;&org_type=&dtml-org_type;">City
                <dtml-if "sort_by=='city'">
                    <img src="/img/arrow_down" border="0">
                </dtml-if>
                </a></b></td>
        </tr>
...
...
...




--
Milos Prudek