webgo/templates/macros.cs

15 lines
458 B
C#
Raw Normal View History

<?cs def:select_list(itemlist, listname, selected) ?><?cs
#create a drop down list out of the items of itemlist.
# use 'listname' as name for the select tag.
#use 'selected' as preselected value.
?>
<select name="<?cs var:listname ?>">
<?cs each:item = itemlist ?>
<?cs if:item == selected ?>
<option selected> <?cs var:item ?> </option>
<?cs else ?>
<option > <?cs var:item ?> </option>
<?cs /if ?>
<?cs /each ?>
</select>
<?cs /def ?>