[PHPTAL] true:

lbedubourg lbedubourg at motion-twin.com
Mon Nov 13 11:17:47 CET 2006


Hi Jonathan,

> true: isn't specifically in the TAL spec as a modifier ( its the  
> default condition ), but most other implementations support 'true:'  
> and few even require it to work right
> 
> i'm using a custom modifier to handle it, but i wanted to suggest  
> that true: be part of the official release, so compatibility with  
> other TAL implementations works

I'll check that during this week.

> most TAL implementations won't throw an error for this:
> 
> 	<div tal:condition="true: Messages">
> 		<div tal:repeat="message Messages" tal:content="message"  
> class="error"/>
> 	</div>
> 
> PHPtal is a little unhappy with Messages not being declared.
> 
> Is there any way to get it to not throw an error?

Try <div tal:condition="exists: Messages"> to check if a variable is
defined or not.

Best regards
Laurent





More information about the PHPTAL mailing list