Welcome Guest, Not a member yet? Register   Sign In
question to html table
#1

[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
#2

[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.
#3

[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
#4

[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
#5

[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..




Theme © iAndrew 2016 - Forum software by © MyBB