Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

Re: [ic] selected tag



Kaare Rasmussen wrote:
> 
> What am I doing wrong?
> 
> I try to have one <option> selected if it matches a preset scratch variable.
> But it doesn't work.
> 
> [query list=1 sql="SELECT deliverycode,name FROM co_deliveryterms ORDER BY
> deliverycode"]
> [list]
>   <OPTION VALUE="[sql-param deliverycode]"
>   [selected interpolate=1 [sql-param deliverycode] [scratch deliverycode] ]>
>   [sql-param name]
>  </OPTION>
> [/list]
> [/query]
> 

You cannot mix named and ordered parameters. And, you must quote to
force interpolation. Moreover, the interpolate directive applies to the
body of a containing tag, which doesn't apply here.

[selected name=[sql-param deliverycode] value="[scratch deliverycode]"]

[*-param...] tags do not need forced interpolation as they are parsed
prior to other tags within the block. However, it doesn't hurt and can
obviate problems with unexpected spaces.

-- 
Mark Johnson
Akopia Professional Services
mark.johnson@akopia.com
703-456-2912

_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: