Last active
December 29, 2015 19:19
-
-
Save felixmc/7716338 to your computer and use it in GitHub Desktop.
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 StaticPage extends CI_Controller { | |
public function __construct() { | |
parent::__construct(); | |
$this->load->model('static_page_model'); | |
} | |
public function index () { | |
$slug = $this->uri->segment(1); | |
$page = $this->static_page_model->getPage($slug); | |
if ($page) { | |
$this->load->view("static_page", $page); | |
} else | |
show_404(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment