[eluser]Unknown[/eluser]
Hello. Armed with the knowledge I gleaned from Thomas Myer's Professional CI book, I'm currently building my first CI app (and this is my first post).
I've run into a quandry that I'd like to get some advice on. First off, I am not the most experienced PHP coder out there so I apologize in advance if my comprehension of things seems rudimentary.
My app up to this point is based on much of the code from the book with some of my own original code that I've subsequently written. So I have a single controller that includes a method specifically for my pages:
Code:
function pages($path) {
//use for pages
$page = $this->MPages->getPagePath($path);
$data['main'] = 'page';
$data['title'] = $page['name'];
$data['page'] = $page;
$this->load->vars($data);
$this->load->view('template');
}
The page method pulls the page path
and all content from the Pages table in the database. The problem I am running into is I have a couple of pages that need to use a completely different view... it is loading
Code:
$this->load->view('template');
as the view for all pages. How would I go about applying a different view to a specific page? For example I have a page called eight-steps.html in my Pages table that needs to have a different view applied. What would the procedure be for accomplishing this? Am I thinking about this wrong? Is there a best practice way to do this?
Any advice will be greatly appreciated. Thanks...