On Nov 15, 2003, at 8:06 AM, Nishikant Kapoor wrote:
Hello list,
How can I display the retrieved results at predefined spots in the output template, using a tmpl_loop?
Here is the exact problem:
I retrieve 8 members from db, create a tmpl_loop and display them in the template in 4 rows. But, I want these members to be at certain spots:
Member-2 Member-5 Member-7 Member-1 Member-3 Member-6 Member-4 Member-8
two ways come to mind --
1. judicious use of tmpl_if and ::expr
OR
2. the tmpl_loop is nothing but a ref to an array of hashes. Array elements can be arrranged any way you want, and the arrangment will persist (unlike a hash, which has its own mind about these things). Just arrange your results from the db in the way you want before stuffing them in the array... when you unfold the array you will get what you want.
------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users