Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

multiple html_table in one template

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
talo
Smarty Rookie


Joined: 18 Oct 2005
Posts: 16

PostPosted: Wed Nov 01, 2006 8:09 am    Post subject: multiple html_table in one template Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP