Home » U++ Library support » U++ MT-multithreading and servers » Witz and map variable
Re: Witz and map variable [message #38050 is a reply to message #38040] |
Thu, 29 November 2012 10:37   |
Zbych
Messages: 327 Registered: July 2009
|
Senior Member |
|
|
Perhaps you are right. But know I need to keep some language specific things in *.t files and some in *.witz.
I have one more question for you.
I have a drop list and want to preselect one value from it.
Right now I create a map ("Item1", "0")("Item2", "1")("Item3", "0"), pass it to witz and use $if to preselect position.
<select name="MyList">
$for(i in MYLIST)
$if ( i != 0 )
<option value="$i._key" selected="selected">$i._key</option>
$else
<option value="$i._key">$i._key</option>
$/
$/
</select>
Is there a shorter way (without $if)? Maybe something similar to c?
$for(i in MYLIST)
<option value="$i._key" $(i != 0) ? selected="selected" : "">$i._key</option>
$/
[Updated on: Thu, 29 November 2012 10:42] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Jul 15 00:06:55 CEST 2025
Total time taken to generate the page: 0.03909 seconds
|