Re: [PHPTAL] tree in PHPTAL

2008-12-16 Thread Nick Pack
Thanks Kornel On 16/12/2008 11:46, "Kornel Lesiński" wrote: > On 16-12-2008 at 11:39:48 Nick Pack wrote: > >> Sorry to dig up an old thread guys, I've been attempting to use Kornel's >> code below but am getting an exception when there is not a third >> dimension >> array, for example: >> >>

Re: [PHPTAL] tree in PHPTAL

2008-12-16 Thread Kornel Lesiński
On 16-12-2008 at 11:39:48 Nick Pack wrote: Sorry to dig up an old thread guys, I've been attempting to use Kornel's code below but am getting an exception when there is not a third dimension array, for example: ${l/Title} Your macro uses menu variable for each level: but

Re: [PHPTAL] tree in PHPTAL

2008-12-16 Thread Nick Pack
Sorry to dig up an old thread guys, I've been attempting to use Kornel's code below but am getting an exception when there is not a third dimension array, for example: ${l/Title} Using: $this->view->menu = array('Title'=>'Section 1', 'Pages'=>array( array('Title'=>'postgr

Re: [PHPTAL] tree in PHPTAL

2008-12-04 Thread Kornel Lesiński
On 04-12-2008 at 09:34:03 a b <[EMAIL PROTECTED]> wrote: Below is a sample of how I store and display in PHP tree structure stored in the database. Can anybody tell me how to rewrite this code into PHPTAL? I assume, that I should use macro recurrency, but how to prepare array in such case?

[PHPTAL] tree in PHPTAL

2008-12-04 Thread a b
Hi, Below is a sample of how I store and display in PHP tree structure stored in the database. Can anybody tell me how to rewrite this code into PHPTAL? I assume, that I should use macro recurrency, but how to prepare array in such case? TIA sublist $prevDepth = -1; foreach ($list as $item)