[eluser]bleu[/eluser]
i have my website structure in the following fashion
My controller has
Code:
function page2($page) {
$data['page_title'] = 'Your title for content 2';
$data['news'] = $this->news_model->get_news($page);
$this->load->view('container',$data);
}
My container view has
Code:
<html>
<head>
<title>hi</title>
</head>
<body>
<?php
$this->load->view('header');
$this->load->view('menu');
$this->load->view($page);
$this->load->view('footer');
?>
</body>
</html>
Now my header and menu will have certain data that will be changing and coming from the database or being calculated.
e.g My menu will display more menu items( which it will get from the database) as per the page selected.
e.g.2 My header will have a counter which will show what work the user has done(and will bring some data from the database)(kind of like no of items selected in a shopping cart and total amount. which it may pick up from database) and even his login status. with a login form and a welcome message when he is logged in
How can I pass that data?