CodeIgniter url routing

#4
[eluser]redcore[/eluser]
Okay, while I'm still a little confused (I was with pbreit) ... are you storing all page content (ie "about", "about/history") in your database? If so, I'm assuming you're setting up that page content IN the database and want CodeIgniter to route based on those values, right?

IF so (big if, I'm clearly not sure what you're ultimately doing) then you'll have to build a script that gets the routes/ids from the database and puts the routes array (for "config/routes.php") together dynamically...

Code:
foreach($query->result() as $row) {
    $routes[] = '$route['.$row->route.'] = "pages/index/'.$row->id.'"';
    }

That's my best shot at figuring out what you're trying to do ATM.


Messages In This Thread
CodeIgniter url routing - by El Forum - 06-25-2010, 10:06 AM
CodeIgniter url routing - by El Forum - 06-25-2010, 05:38 PM
CodeIgniter url routing - by El Forum - 06-26-2010, 12:27 AM
CodeIgniter url routing - by El Forum - 06-26-2010, 08:45 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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