[eluser]Unknown[/eluser]
Hi there,
I've been looking on the internet for help with this. Too bad i couldnt find anything helpfull.
I've got a page controller and i'm using the template builder.
Now with my page controller
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Page extends CI_Controller
{
public $layout = 'default';
public $templateName;
public function __construct()
{
parent::__construct();
$this->template->set_layout($this->layout);
}
/**
* Index page
*/
public function index($page = 'default')
{
$this->templateName = $page;
$this->template->title('Websitea');
$this->template->build($this->templateName);
}
}
/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */
And my routes.php
Code:
$route['page/(:any)'] = 'page/$1';
So in my view dir i've got a 'default.php' template, that will be the homepage, now i want to make more pages, like about-me, i got the file 'about-me.php' also in my view dir.
What i want now, is that i can visit localhost://[websitename]/about-me.html and that would the load the about-me.php template.
Because now its like localhost/[websitename]/page/about-me
Could someone help me with this problem?