[Petal] Neato Tricks That Aren't Documented Anywhere

William McKee william at knowmad.com
Fri Jan 14 21:06:54 GMT 2005


On Thu, Jan 13, 2005 at 05:34:14PM -0600, Warren Smith wrote:
> This reminds me. There's a small bug in the Decode.pm.

Hi Warren,

After adding your code, I went back and added a test to prove the fix
was good. I had to fix your Petal template to get the test to work.
Here's the working version:

    <select>
      <option tal:repeat="option options" tal:attributes="label
      option/label; value option/value; selected decode: option/value
      myselect 1"></option>
    </select>

Notice that I changed your decode statement to "option/value myselect 1".


Thanks,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com


More information about the Petal mailing list