[PHPTAL] Error in the manual or bug in phptal?

Kornel Lesiński kornel at aardvarkmedia.co.uk
Thu Aug 21 12:38:00 CEST 2008


On 21-08-2008 at 10:37:52 tarjei <tarjei at nu.no> wrote:

> 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.

XHTML is case-sensitive. SELECTED attribute is an error in XHTML. You must  
use lowercase name, and then PHPTAL will handle this properly.

Also false is displayed as 0. I've corrected the manual to suggest NULL  
instead (it doesn't matter in case of selected attribute anyway).

-- 
regards, Kornel



More information about the PHPTAL mailing list