{section} question

From: Date: Tue, 27 Feb 2001 23:38:27 +0000
Subject: {section} question
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-233@lists.php.net to get a copy of this message
I haven't fully understood how smarty handles {sections}, so this is probably a very stupid question. I have an array that looks like this [0] [text] => Main [children] [0] [text] => News [1] [text] => Messages [2] [text] => Settings [3] [text] => Logout [1] [text] => Tasks [children] [0] [text] => New Program [1] [text] => New Version [2] [text] => New Customer I would like to do a nested section, so that it loops first through the parent items and then the child items. The code then looks somewhat like this: {section name=parent loop=$mainmenu} {$parent/mainmenu.text} {section name=child loop=$parent/mainmenu.children} {$parent/mainmenu.child.text} <-- error! {/section} </td> {/section} The line marked "error" doesn't work. On that line, I'd like to get the output: News, Messages, Settings, Logout and then New Program, New Version, New Customer. Any ideas how to write that line (I've tried for one hour now and I'm getting tired of it now). Thanks in advance, Victor Boivie

« previous php.smarty.general (#233) next »