koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-devel] Branches and opac reserve template


From: Chris Cormack
Subject: Re: [Koha-devel] Branches and opac reserve template
Date: Tue Jul 29 15:14:19 2003
User-agent: Mutt/1.3.28i

> > 
> >
> the 1st solution MUST be used in every place where you can have a 
> default value (until someone shows me readable & easy-to-understand 
> template-only method)
> the 2nd may be more versatile, but only when there is no default value.
> 
Hi guys

You can do the second method, with a default value. Its just a little tricky
heres a snippet

tr valign="top">
<td>Language:</td>
<td> <Select name="language">
<TMPL_LOOP NAME="languages">
<option value="<TMPL_VAR NAME="language">"
<TMPL_IF NAME="selected">Selected</TMPL_IF>><TMPL_VAR
NAME="language"></option>
</TMPL_LOOP>
</select>
</td>
</tr>

and for one element of your languages array, it will have selected set, eg

$languages->[3]->{'selected'}=1

Hope this helps

Chris
-- 
Chris Cormack                                                     Programmer
027 4500 789                                       Katipo Communications Ltd
address@hidden                                          www.katipo.co.nz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]