Nesting
| From: | George Pitcher | Date: | Wed, 09 Jun 2004 06:56:47 +0000 |
| Subject: | Nesting | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11439@lists.php.net to get a copy of this message | ||
Hi,
An appropriate subject considering I work for an organisation named 'Heron'.
I am using Smarty with PEAR:DB/MySQL. Some of my pages are lists of reading
materials being sent to an agency for permission to scan etc. I present my
data as:
Course 1 (displaying several items of course information
Extract 1 (ditto but for the extract)
Extract 2 (ditto but for the extract)
Extract 3 (ditto but for the extract)
Extract 4 (ditto but for the extract)
Course 2 (displaying several items of course information
Extract 5 (ditto but for the extract)
Extract 6 (ditto but for the extract)
Extract 7 (ditto but for the extract)
Extract 8 (ditto but for the extract)
and so on until all courses and extracts have been handled.
So far I've been doing this conventionally by performing nested loops in
php, and comparing the Extracts course_id with the pack to see if a new pack
loop needs to be started. Its worked well so far.
I'm not sure how I should tackle this in Smarty. Any clues or pointers?
MTIA
George in Oxford