On 13.06.2009, at 21:41, Igor Sverkos wrote:

My template looks like:

<select>
<option tal:repeat="option options" tal:attributes="value option/ value;
selected option/isSelected | nothing" tal:content="option/label"/>
</select>

But the output will look like:

<select>
  <option value="1">Option1</option>
  <option value="2" selected="1">Option2</option>
  <option value="3">Option3</option>
</select>

I expected it will look like:

<select>
  <option value="1">Option1</option>
  <option value="2" selected="selected">Option2</option>
  <option value="3">Option3</option>
</select>

What's the problem?

It's a bug - now fixed in SVN.

Instead of "option/isSelected | nothing" you can use "exists:option/ isSelected", which works in current versions of PHPTAL.

--
regards, Kornel




_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to