Configure route using values from database? |
[eluser]vigna[/eluser]
Hi, Is it possible to load a model in the routes.php file? The reason is, I want to use the existing values in the database and create a routes configuration. It's a CMS website. And I have got the link (http://www.example.com/aboutus) something like this. I have a table pages and fields such as title, content, meta_keywords, link_text etc... In the link_text field I store text such as contact_us, about_us etc.. I want to form something like Code: foreach ($pages as $page): so if I call http://www.example.com/aboutus or http://www.example.com/terms the pages controller, view function should be called. I cannot figure it out how to get the table contents in the route.php file? Please let me know am I trying it in the right way? Thanks
[eluser]pistolPete[/eluser]
How about using the forum search? http://ellislab.com/forums/viewthread/121486/ http://ellislab.com/forums/viewthread/90632/ http://ellislab.com/forums/viewthread/86097/ http://ellislab.com/forums/viewthread/96174/ |
Welcome Guest, Not a member yet? Register Sign In |