Arkadaşlar yapıyı şu şekilde geliştirdim , işinize yarayacağını umuyorum .
controllers/index.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Index extends CI_Controller {
//Default bilgiler
public $bilgiler = array(
"page" => "anasayfa",
"header" => "header",
"footer" => "footer",
"menu" => "menu",
"sidebar" => "sidebar",
);
public function index()
{
$bilgiler = $this->bilgiler;
$this->load->view('case',$bilgiler);
}
public function uyeol()
{
$bilgiler = $this->bilgiler;
$bilgiler["page"] = "uyeol";
$this->load->view('case',$bilgiler);
}
}
?>
views/case.php
<?php
$a = $this->db->query('SELECT * FROM settings');
$a = $a->row_array();
$this->load->view($header,$a);
$this->load->view($menu);
$this->load->view($page);
$this->load->view($sidebar);
$this->load->view($footer);
?>