Return to Snippet

Revision: 23439
at February 8, 2010 00:08 by mattstopa


Initial Code
<?php
class Snippets extends Controller {

	function Snippets()
	{
		parent::Controller();
					$this->load->model('Snippet');

	}

	function index()
	{
			$data["query"] = $this->db->get('snippets');
			
			$data['title']  = 'My page title';
			$data['footer'] = "Copyright: Matt Stopa 2010";
      
			$partials = array('contents'=>'snippetsview');
			
			$headers = Array("Language", "Name", "Description");
			$this->table_display->set_headers($headers);
			$this->table_display->set_query($data["query"]->result());
			$this->table_display->set_display_order(Array("language", "name", "description"));
			$this->table_display->set_alternate_row_color(TRUE, array("rowone", "rowtwo"));
			$this->table_display->set_links(array("description" => array("index.php/snippets/mah/", "index")));
						
      $this->template->load('template', $partials, $data);
			
			//$this->template->load('template', 'about');
	}
	
	function mah () {
	}

	
}
?>

Initial URL

                                

Initial Description

                                

Initial Title
Basic Code Igniter Controller

Initial Tags

                                

Initial Language
PHP