|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
talo Smarty Rookie
Joined: 18 Oct 2005 Posts: 16
|
Posted: Wed Nov 01, 2006 8:09 am Post subject: multiple html_table in one template |
|
|
Hi All,
I've mannaged to solve the all time problem with having multiple html_table functions on the same template with a very simple fix.
all you have to do is add an 'id' parameter, make it unique per html_table
e.g. Code: | {html_table id="x1"} {html_table id="x2"} |
of course with the other common parameters...
and then in you html_table plugin add the following:
when calling the smarty_function_html_table_cycle concat the $id to the first variable sent
e.g. Code: | smarty_function_html_table_cycle('tr'.$id, $tr_attr) |
that makes the static variable in that function unique and enables you to assign different tr and td attributes to different html_tables on the same template.
hope this helps you guys,
ciao,
T. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|