F1, F1, F1 please! Routing / remapping |
[eluser]Cippo[/eluser]
Hello everyone, I use CodeIgniter and Doctrine for a custom CMS that I build for my website. Right now, my uri is something like: http://example.com/home/index/1 ( for the homepage ) and http://example.com/home/index/2 ( for about page - ps: there will be several pages for main navigation ). I want to ask you if there is a way to access http://example.com/about instead of example.com/home/index/2. In this moment, I have two tables in my database: content and pages and I set up a relationship between them. Here’s the function for home model: Code: class Home_Model extends Doctrine_Record And my controller: Code: public function index($id) Code: $route[‘about-me’] = “home/index/2”; Code: $route['(:num)'] = 'home/index/$1'; BUT what I want is to replace the id with the 'slug' that I have created in my database Pages table. PS: I've been looking over the forum all day long but couldn't find that something. I've got some headaches so I'm asking for some help. Thanks |
Messages In This Thread |
F1, F1, F1 please! Routing / remapping - by El Forum - 03-22-2010, 03:21 PM
F1, F1, F1 please! Routing / remapping - by El Forum - 03-22-2010, 03:43 PM
F1, F1, F1 please! Routing / remapping - by El Forum - 03-23-2010, 03:32 AM
F1, F1, F1 please! Routing / remapping - by El Forum - 03-23-2010, 07:22 AM
|