[eluser]handoyo[/eluser]
Hi all,i'm trying to load data(online store phone number) to footer.
I got controller for home like this
controller/home.php
Code:
function index()
{
$data['title'] = "Selamat datang di 7Com";
$data['navlist'] = $this->MCat->getkategoriNav();
//this is the data i want to load to footer
$data['konfigurasi'] = $this->MConfig->getAllConf();
$data['main'] = 'home/index';
$this->load->vars($data);
$this->load->view('template',$data);
}
view/template.php
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $title; ?></title>
<link href="<?= base_url();?>css/default.css" rel="stylesheet" type="text/css" />
<noscript>
Javascript is not enabled! Please turn on Javascript to use this site.
</noscript>
[removed]
//<![CDATA[
base_url = '<?= base_url();?>';
//]]>
[removed]
[removed][removed]
[removed][removed]
[removed][removed]
</head>
<body>
<div id="wrapper">
<div id="header">
<?php $this->load->view('header');?>
</div>
<div id="nav">
<?php $this->load->view('navigation');?>
</div>
<div id="main">
<?php $this->load->view($main);?>
</div>
<div id="footer">
<?php $this->load->view('footer');?>
</div>
</div>
</body>
</html>
view/footer.php
Code:
Copyright <?php echo date("Y"); ?>
<?php echo anchor("welcome/pages/privacy","privacy policy");?>
<?php echo anchor("login","dashboard");?>
How should i pass the data for example $konfigurasi['store_phone_number'] to footer so i can put it in the footer ?Thanks a lot..