[nycphp-talk] Smarty Template question

Cliff Hirsch cliff at
Mon Oct 2 21:48:14 EDT 2006

I have a table comprised of a PHP file and Smarty template. It's so
lovely that I have decided to display it several times on one page, with
different conditions for each iteration. Example: a table for pending
projects, a table for completed project.terminated projects, etc. 
If the PHP and templates were built successively, I think this would
work. But since, with Smarty, the PHP runs first and than the individual
template "pieces" are populated with the assigned variables, the last
"table build" would simply be displayed in all the tables. Follow me?
Making each PHP version of the table an object would be simple. But how
can I use one template for multiple instances on one page? The only
solution I can think of it to build an array and have loop over the
array for each version of the table. Any other ideas?
Pinestream Communications, Inc.
Publisher of Semiconductor Times & Telecom Trends
52 Pine Street, Weston, MA 02493 USA
Tel: 781.647.8800, Fax: 781.647.8825 <> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the talk mailing list