Created
August 5, 2013 12:41
-
-
Save haganbt/6155634 to your computer and use it in GitHub Desktop.
Pages Controller - Manage static pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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