Author Topic

Łukasz Serwatka

Monday 03 July 2006 11:30:09 pm

Comment46278

First you need to assing value to the TPL variable $myObject. In TPL define variable then in PHP use

$tpl->setVariable( 'myObject', $myObject );

Then you need to use:

{foreach $myObject[0] as $index => $value} 
   {$index} : {$value}
{/foreach}

or just

$tpl->setVariable( 'myObject', $myObject[0] );

then

{foreach $myObject as $index => $value} 
   {$index} : {$value}
{/foreach}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog