[Zope] <dtml-in>

Székely Csaba bubu@revox.ro
Wed, 25 Sep 2002 16:40:05 +0300


Hi there,
I'm new in Zope, and I have some  problems.
The first:

<dtml-var standard_html_header>
   <dtml-in expr="select_sql(qry_table='localitate', qry_fields='locID, 
localitate')">
        <dtml-if expr="locid == locid_form">
           <h3><dtml-var locid></h3><br><dtml-var locid_form><br><br>
       <dtml-else>
          <dtml-var locid><br><dtml-var locid_form><br><br>
      </dtml-if>  
 </dtml-in>

I get the <dtml-var locid_form> from a    DTML Document.
The goal is to highlight one line from the list.

The second is related to the 1'st one :
I have this select list:

<select name=tipos size="3">
      <dtml-in expr="select_sql(qry_table='tipOS', qry_fields='tipOS, 
descriere')">
            <option value="&dtml-tipos;"><dtml-var descriere>
      </dtml-in>
 </select>

I'd like to have a default selection, based on a input parameter.
I fugured that it will be something like this:

<select name=locid>
       <dtml-in expr="select_sql(qry_table='localitate', 
qry_fields='locID, localitate')">
             <dtml-if expr="locid == locid_form"           
                  <option value="&dtml-locid;" selected><dtml-var 
localitate>
              <dtml-else>
                  <option value="&dtml-locid;"><dtml-var localitate>
              </dtml-if>
       </dtml-in>
</select>

but it's not working, like I  thought it would.
So I need some help wit this, I allready RTFM, for a couple of time.
Thanx.

Bubu