Welcome Guest, Not a member yet? Register   Sign In
Sub Pages controllers
#1

[eluser]Unknown[/eluser]
Hi everyone im a newbie in CI and i got a problem loading my sub pages for example in Product i got 3 sub pages prod 1, 2 and so..then when i click my product and other subpages its only loaded the Product Subpages.. here are my sample controller..

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Pages extends CI_Controller {


public function index()
{

}
function show($page)
{
//echo $page;
$data['projTitle']=$this->config->item('project_title');
$data['assetsPath']=$this->config->item('assets_path');
#HEADER
$this->load->view('global/header', $data);
#MENU
$this->load->library('menulib');
$data['menu'] = $this->menulib->getHTML($page);
$this->load->view('global/menu', $data);
#CONTENT
/*$this->load->view('main', $data);*/
$this->load->view('_variables/subpage', $data);

#FOOTER
$this->load->view('global/footer', $data);
}
function about_us($about){
$data['projTitle']=$this->config->item('project_title');
$data['assetsPath']=$this->config->item('assets_path');
#HEADER
$this->load->view('global/header', $data);
#MENU
$this->load->library('menulib');
$data['menu'] = $this->menulib->getHTML($page);
$this->load->view('global/menu', $data);
/* $data['Title']="About us";*/
$this->load->view('about_us', $data);
$this->load->view('global/footer', $data);
}
}

Hope you can help me to figure out what i must supposed to do then..Thanks




Theme © iAndrew 2016 - Forum software by © MyBB