Welcome Guest, Not a member yet? Register   Sign In
adding class to html table row
#2

[eluser]InsiteFX[/eluser]
Why, you can create your own Table Template add the class right there.
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Class  Admin_Controller
*
* @package  CodeIgniter
* @subpackage Controller
* @category Controllers
* @author  Raymond King aka:(InsiteFX).
* @copyright Copyright (c) 2005 - 2011, Advanced Computer Systems, LLC.
* @license  http://www.learnellislab.com/codeigniter/user-guide/license.html
* @link  http://www.learnellislab.com/codeigniter/user-guide/libraries/name.html
* @since  Version 1.0.0
*/

class Admin_Controller extends Base_Controller {

// --------------------------------------------------------------------

/**
  * Class Variables - protected, private, public and static variables.
  * --------------------------------------------------------------------
  */


// --------------------------------------------------------------------

/**
  * __construct()
  *
  * Constructor PHP 5+
  *
  * @access public
  * @return void
  */
public function __construct()
{
  parent::__construct();

  $this->load->library('table');

  $tmpl = array (
   'table_open'   => '<table border="0" cellpadding="4" cellspacing="0">',

   'thead_open'   => '<thead>',
   'thead_close'   => '</thead>',

   'heading_row_start'  => '<tr>',
   'heading_row_end'  => '</tr>',
   'heading_cell_start' => '<th>',
   'heading_cell_end'  => '</th>',

   'tbody_open'   => '<tbody>',
   'tbody_close'   => '</tbody>',

   'row_start'    => '<tr>',
   'row_end'    => '</tr>',
   'cell_start'   => '<td>',
   'cell_end'    => '</td>',

   'row_alt_start'   => '<tr class="alt">',
   'row_alt_end'   => '</tr>',
   'cell_alt_start'  => '<td>',
   'cell_alt_end'   => '</td>',

   'table_close'   => '</table>'
        );

  $this->table->set_template($tmpl);
}

} // End of Class.


/* ------------------------------------------------------------------------
* End of file Admin_Controller.php
* Location: ./application/core/Admin_Controller.php
* ------------------------------------------------------------------------
*/


Messages In This Thread
adding class to html table row - by El Forum - 07-11-2012, 12:58 PM
adding class to html table row - by El Forum - 07-11-2012, 01:47 PM
adding class to html table row - by El Forum - 07-11-2012, 03:12 PM
adding class to html table row - by El Forum - 07-11-2012, 06:01 PM
adding class to html table row - by El Forum - 07-11-2012, 06:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB