Skip to content

Instantly share code, notes, and snippets.

@tim-peterson
Created February 14, 2012 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim-peterson/1823105 to your computer and use it in GitHub Desktop.
Save tim-peterson/1823105 to your computer and use it in GitHub Desktop.
function load_main($view = '', $view_data = array(), $return = FALSE)
{
$this->set('nav_list', array('Home', 'Photos', 'About', 'Contact'));
$this->load('template', $view, $view_data, $return);
// $this->load('template2' $view, $view_data, $return);
}
Corresponding code in your controller:
$this->template->set('nav', 'About');
$this->template->set('title', 'About me');
$this->template->load_main('about');
// $this->template->load_main('about2');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment