Welcome Guest, Not a member yet? Register   Sign In
<colgroup>, <tfoot> to library Table.php ?
#1

[eluser]Jaketoolson[/eluser]
For css styling purposes, I rely on <colgroup> in my tables to zebra stripe my table columns. Your Table.php library lacks code inserting <colgroup /> into the table structure. While I'm on the subject, it has <thead> code but is also lacking <tfoot>. I just thought it would be nice if you consider including them in the library function to be me complete and thorough.

I added the following code to the table library right after the table headings are generated:
Code:
for($i=0;$i<=$total_rows;$i++)
{
   $out .= $this->template['colgroup'];
   $out .= $this->newline;    
}

And then of course to the _default_template function, I added the following code to the array:
Code:
'colgroup'     => '<colgroup></colgroup>',


One thing I'm excited about is the ability to apply a function to the cell data! This is EXACTLY what I needed and it didn't exist in the previous version of CI and I therefore was filtering the data before the table was generated. Now I can just run the callback function at the cell level. Thanks!


Messages In This Thread
<colgroup>, <tfoot> to library Table.php ? - by El Forum - 02-08-2011, 11:02 PM
<colgroup>, <tfoot> to library Table.php ? - by El Forum - 02-23-2011, 05:30 PM
<colgroup>, <tfoot> to library Table.php ? - by El Forum - 02-24-2011, 10:21 AM
<colgroup>, <tfoot> to library Table.php ? - by El Forum - 02-24-2011, 11:37 AM
<colgroup>, <tfoot> to library Table.php ? - by El Forum - 02-24-2011, 12:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB