[Zope] Simple(?) Syntax Question (dtml-in)

Spicklemire, Jerry Jerry.Spicklemire@IFLYATA.COM
Fri, 25 Aug 2000 16:02:01 -0500


Tim asked:

>I want to only provide the first item of each list in this
>SELECT:

You can use Python "slice" syntax, where the first item of a sequence (index
position 0), is indicated like:	listname[0]

try:

<dtml-in valid_prj>
  <dtml-call "REQUEST.set('val_prj_seq_item', _['sequence-item'][0])">
  <OPTION value="&dtml-val_prj_seq_item;"><dtml-var
"val_prj_seq_item"></OPTION>
</dtml-in>