Skip to content

Instantly share code, notes, and snippets.

@haganbt
Created August 5, 2013 12:41
Show Gist options
  • Save haganbt/6155634 to your computer and use it in GitHub Desktop.
Save haganbt/6155634 to your computer and use it in GitHub Desktop.
Pages Controller - Manage static pages
<?php
class Pages extends CI_Controller {
function _remap($method)
{
is_file(APPPATH.'views/pages/'.$method.'.php') OR show_404();
$headerdata['title'] = ucfirst($method);
$headerdata['nav'] = $this->navigation->load($method);
$this->load->view('templates/header', $headerdata);
$this->load->view("pages/$method");
$this->load->view('templates/footer');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment