Welcome Guest, Not a member yet? Register   Sign In
Menu views and dynamic or static menu information needed.
#1

[eluser]ytsejam[/eluser]
Hello ,
I am a newbie with CI. I want to write an application with a sidebar menu and information gathered from mysql database. I want to learn that which is better if menu items wont change much static or dynamic menu.

The other problem is that , I use pages controller to show pages
Code:
<?php

class Pages extends CI_Controller {

  public function view($page = 'home')
  {
    
   if ( ! file_exists('application/views/pages/'.$page.'.php'))
   {
    // Whoops, we don't have a page for that!
    show_404();
   }
  
   $data['title'] = ucfirst($page); // Capitalize the first letter
  
   $this->load->view('templates/header', $data);
   $this->load->view('pages/'.$page, $data);
   $this->load->view('templates/footer', $data);

  }
This is the menu I want :
Code:
+homepage
+about
+services
  +education
  +biofeedback
Where shall i put the menu controller ? If i use a seperate menu controller , how can i make it shown after header?


Messages In This Thread
Menu views and dynamic or static menu information needed. - by El Forum - 07-31-2012, 07:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB