[eluser]SplashCreativity[/eluser]
Hey everyone, I'm not new to MVC frameworks though I am relatively new to codeignitor.
What can I say, I love it!
I have an issue though, I have my welcome controller for the first page, which goes something like this:
Code:
function index()
{
$header['title'] = "Auto Jantes";
$header['keywords'] = array("Auto", "Jantes");
$header['description'] = "Development Website";
$header['content_title'] = "Bienvenue chez AutoJantes";
$this->load->helper('form');
$header['email'] = array(
'name' => 'email',
'value' => 'Adresse email',
'class' => 'menu_input',
'onClick' => 'this.value=\'\''
);
$header['password'] = array(
'name' => 'password',
'value' => 'Mot de passe',
'class' => 'menu_input',
'onclick' => 'this.value=\'\''
);
$header['submit'] = array(
'name' => 'submit',
'value' => 'Connexion',
'class' => 'menu_submit'
);
$header['register'] = array(
'name' => 'register',
'content' => 'Joindre',
'class' => 'menu_submit',
'onClick' => 'location.href=\'register\''
);
$this->load->view('template/header', $header);
$this->load->view('welcome');
$this->load->view('template/footer');
}
As you can see I am using the form helper in my header, this is because the header page has a box which asks users to login (shown on each page) unless they are logged in it will show a menu.
My issue is, I don't want to have to place the 17 lines for that login form on every controller / controller function I make. That would suck, instead I'm wondering is there no easy way of including the form helper stuff on every controller by default?
Best Regards
Stephen