I got the following drop-down list - SELECT
element - construction in my ZPT
template:
<select id="record_selector">
<option tal:repeat="record view/records" tal:attributes="value record/id">
<span tal:replace="record/name"></span>
</option>
</select>
How make it possible to have selected OPTION
which value is equal to one from the corresponding view
property (i.e. for example, OPTION
tag value
== view/currentRecordId
then make it selected
).
Using the sdupton's clue, I got the following solution:
TAL
conditionals are awesome :)