[eluser]Référencement Google[/eluser]
I don't know then, last thing I can do is post my page controller:
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Page extends MY_Controller {
/**
* Constructor
*
* @access public
*/
function Page()
{
parent::MY_Controller();
}
// --------------------------------------------------------------------
/**
* Initial Method
*
* @access public
*/
function index()
{
$this->show();
}
// --------------------------------------------------------------------
/**
* Display the page passed as uri segment
*
* @access public
*/
function show($url = FALSE)
{
$this->template->page($url);
}
}
/* End of file page.php */
/* Location: ./application/controllers/page.php */
Note that I use a custom template lib with this method inside:
Code:
/**
* Display Global View Elements
*
* @access public
* @param mixed some data
*/
function page($url = FALSE, $data = array())
{
// If no URL was set, redirect to the home page
if( ! $url)
{
redirect();
}
// If the requested file don't exist, we display a 404
if( ! file_exists(APPPATH.'views/pages/'.$url.EXT))
{
show_404();
}
// Send output to the browser
$this->display('pages/'.$url, $data);
}