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

2009-04-05 Thread Kornel Lesiński
On 04.04.2009, at 03:15, Bobby wrote: Hello, I'm new to PHPTal and i've run into a few issues... They're fixed now :) Please test: http://phptal.motion-twin.com/files/PHPTAL-1.2.0a5.tar.gz -- regards, Kornel ___ PHPTAL mailing list PHPTAL@list

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'); $template->set(AppConstants::ERR

Re: [PHPTAL] Problem accessing attributes from a SimpleXML object in PHPTAL templates

2009-04-05 Thread Bobby
No it's not a bug, each item in ads is an SimpleXMLElement object (which does contain the string) and to guarantee printing the correct value you will need to cast it as a string. foreach($adsFile->ad as $item) { $ads[] = array('title'=> (string)$item['title'], 'de