[Zope] Indirect variable references

Pavlos Christoforou pavlos@gaaros.msrc.sunysb.edu
Thu, 4 Feb 1999 00:56:39 -0500 (EST)


On Wed, 3 Feb 1999, Timothy Grant wrote:

>       <!--#in PriceCategories-->
>         <tr>
>           <td>
>             <B><!--#var Category--></B>
>           </td>
>           <td>
>             <select name="<!--#var Category-->" size=1>
>               <!--#in "PriceTable(PriceGroup=_['Category'])"-->
>                 <option><!--#var Description-->
>                 <!--#call "REQUEST.set('cost',Cost)"-->
>               <!--#/in-->
>             </select>
>           </td>
>           <td>
>           </td>
>         </tr>
>       <!--#/in-->  
> 
> As you can see the code builds a number of select boxes that are named with
> the names that are contained in the first Tiny Table.
> 
> After the form has been submitted, I need a way of accessing the contents
> of those select variable names, and I cannot figure out how to do it.


Try the following

<!--# in PriceCategories -->
Category: <!--# var Category-->
has contents: <!--# var "_.getitem(_['Category'])"-->
<!--# /in-->

Untested though.

Pavlos