Re: [PHPTAL] Re: Missing semicolon and constants for variable keys

2009-04-05 Thread Kornel Lesiński
On 04.04.2009, at 22:25, Bobby wrote: I want to eventually make an error list macro, my errors are sent to the template under a constant key name, for example: interface AppConstants { const ERROR_KEY = 'error_key'; } $template = new PHPTAL('example.html');

[PHPTAL] Re: Missing semicolon and constants for variable keys

2009-04-04 Thread Szymek Przybył
div id=error tal:define=errorkey php:AppConstants::ERROR_KEY; errors ${errorkey} tal:repeat=error errors p tal:content=errorerror./p /div Try exchange ${errorkey} to errorkey. cheers! szymek Date: Sat, 4 Apr 2009 02:15:29 + (UTC) From: Bobby bobby.php...@oocr.org

Re: [PHPTAL] Re: Missing semicolon and constants for variable keys

2009-04-04 Thread Bobby
Exchanging will make it loop through the constant stringI broke down and created a new modifier static public function phpeval($src, $nothrow) { return '$ctx-'.eval(return $src;); } div id=error tal:repeat=error phpeval:AppConstants::ERROR_KEY p tal:content=errorerror./p /div Bobby