CodeIgniter Forums
question to html table - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: question to html table (/showthread.php?tid=19045)



question to html table - El Forum - 05-26-2009

[eluser]RcCluster[/eluser]
hi,

i like this class. but i also want to use <thead>, <tbody> and <tfoot>.

is this possible? i think the set_template function is not good for this.

thanks
RcCluster


question to html table - El Forum - 05-26-2009

[eluser]TheFuzzy0ne[/eluser]
Just extend the library to suit your needs. CodeIgniter simply provides a foundation, it's up to you to build upon it.


question to html table - El Forum - 05-26-2009

[eluser]RcCluster[/eluser]
[quote author="TheFuzzy0ne" date="1243361632"]Just extend the library to suit your needs. CodeIgniter simply provides a foundation, it's up to you to build upon it.[/quote]

thanks. i'm very new to ci so please be so kind and give me a little hint in how to extend the table library.

again thanks
RcCluster


question to html table - El Forum - 05-26-2009

[eluser]Dam1an[/eluser]
There's a part in the user guide on extending core libraries (near the bottom)

Basically, you create you're extended class, and then overwrite the method you want to change (in this case the generate function I would assume) so copy that function accross and make whatever changes you want


question to html table - El Forum - 07-07-2009

[eluser]Jazmo[/eluser]
Sorry i'm replying this old topic, but in case search gets you here, and you want just table header and table body, but no table footer, you can do this

Code:
$tmpl = array (
    'heading_row_start'   => '<thead><tr>',
    'heading_row_end'     => '</tr></thead><tbody>',
    'table_close'         => '</tbody></table>');

But maybe extending Table Library would be generally better idea. But then, on the other hand, if you need it just once..