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: Owen Leonard
Subject: Re: [Koha-devel] Branches and opac reserve template
Date: Wed Jul 30 07:31:02 2003

> > >
> > the 1st solution MUST be used in every place 
> where you can have a 
> > default value 
> 
> 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


Sounds good to me!  Not only does it move that HTML into the template where it 
belongs, it gives template authors the option of treating that list as 
something other than a drop-down menu (like radio buttons, for instance).  I 
hope this method can become the preferred one.

  -- Owen 



reply via email to

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