Welcome Guest, Not a member yet? Register   Sign In
Routes with DB Info
#1

[eluser]co[dezyne][/eluser]
I have been scouring around trying to find some information on what I'm attempting to do, and found only this article offering relative answers - problem is, it's from 2008.

Here's hoping there has been some sort of update on this topic.

My controller 'squad' manages all the functionality of an internal group within the larger community of the CMS. I would like to offer admin the ability to change the verb that refers to this group. Examples of such could be: 'team', 'wing', 'platoon', or even 'dogfood' if it satisfies them.

The problem duely noted in the above thread is the issue I have in needing to rewrite the controller name in the URI: Needing to pull the routing from a database string so site.com/squad becomes the value the administrator sets.

I have been researching this for a few hours now and have even attempted to write an extension of the router, but only got this far:
Code:
class MY_Router extends CI_Router {

  function MY_Router()
    {
        $this->config =& get_config();
        parent::__construct();
    }

}

Browsing the web, I have found many functions inside this custom router, but they appear to be far too broad of use than what I'd simply like to accomplish:
Code:
define('UNIT', $this->get_setting('squad-verb') );
$route[UNIT] = "squad";

Does anybody have any suggestions to an approach?


Messages In This Thread
Routes with DB Info - by El Forum - 04-08-2012, 08:38 PM
Routes with DB Info - by El Forum - 04-09-2012, 09:46 AM
Routes with DB Info - by El Forum - 08-07-2012, 08:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB