[eluser]ChristopherDosin[/eluser]
I tryed to code a template controller, but i get a white site without any error.
Maybe someone can help me?
route config
Code:
$route['default_controller'] = "site";
Site.php Controller
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Site extends Controller
{
function index()
{
$data['main_content'] = 'frontpage';
$this->load->view('includes/template', $data);
}
}
views/includes/template.php
Code:
<?php $this->load->view('includes/header_view'); ?>
<?php $this->load->view($main_content); ?>
<?php $this->load->view('includes/footer_view'); ?>
And of course i`ve the frontpage.php in the folder views