Modular portal based on controller names?

#1
[eluser]DanielJay[/eluser]
I am in the process of learning to use CodeIgniter and I am jumping in with 2 feet. I am trying to build a large portal for managing users, laptops, servers, workstations,... Basically something to manage any IT department. I am thinking that my main navigation will be based off of my controller names with something like:
Code:
<?php

class Navigation extends Model {
    
    public function Find()
    {
        $this->load->helper('directory');
        $map = directory_map('system/application/controllers/');
        $navigation = array();
        foreach ($map as $controller) {
            if (substr($controller, -4) == '.php') {
                $navigation[] = ucfirst(substr($controller, 0, -4));
            }
        }
        return $navigation;
    }
}

?>

That way if you have controllers called: dashboard.php, users.php, resources.php you would get Dashboard | Users | Resources ...

The problem is I am going to have sub navigation like: Insert User | Manage Users | Filter and on every page the sub navigation of every other category like users, resources,.. will be available via javascript changing the view style of a particular div. (A navigation similar to Kayako eSupport)

I am planning on storing the controller names in a database table but need to find a clever way to save sub links. Does this make sense?

I had an idea to store sub link title and path in an array, then load each controller and pull that variable so it can be stored in the database with controller names. Of course this would only be ran on an update portal script so it would not be ran ever page load.

Any body else have an idea like this?


Messages In This Thread
Modular portal based on controller names? - by El Forum - 01-14-2008, 08:26 PM
Modular portal based on controller names? - by El Forum - 01-14-2008, 10:10 PM
Modular portal based on controller names? - by El Forum - 01-15-2008, 03:25 AM
Modular portal based on controller names? - by El Forum - 01-15-2008, 03:41 AM
Modular portal based on controller names? - by El Forum - 01-15-2008, 07:47 AM
Modular portal based on controller names? - by El Forum - 01-15-2008, 10:46 AM
Modular portal based on controller names? - by El Forum - 01-15-2008, 11:55 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.