[PHPTAL] Error in the manual or bug in phptal?
tarjei
tarjei at nu.no
Thu Aug 21 11:37:52 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
The manual states:
A somewhat complicated example involving tal:repeat:
<tr tal:repeat="ranking playerRankings"
tal:attribute="class php: repeat.ranking.odd ? 'odd' : false">
...
</tr>
The php: modifier will be explained later, basically if the line is odd
then tr will have a class attribute with "odd" as value, otherwise, no
class attribute will be set.
When I try the following example:
<option value="main-twocolumn.html"
tal:attributes="SELECTED php: menuItem.template == 'main-twocolumn.html'
? 'SELECTED': false"
>Tospalter</option>
I get:
<option value="main-twocolumn.html" SELECTED="0"
>Tospalter</option>
Instead of no selected attribute.
Is this a bug in the phptal documentation or in PHPTAL?
Also, the documentation talks about the tal:attribute method, but if I
use that instead of tal:attributes I just get an error.
This is using 1.1.12.
Kind regards,
Tarjei
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIrTdwYVRKCnSvzfIRAsGCAKCxa7k/CAVJEkQoV6aVl9NV7tH0PwCfdvUx
77ajrtr1mTrYyUOU5eyiCL8=
=Vk1p
-----END PGP SIGNATURE-----
More information about the PHPTAL
mailing list