Yeah I know that I could just write a query connect to the database and all that. I was just not sure if maybe the database class might have already been loaded at this point and I could use that just to keep it all organized. I think I just might call the database.php file if I can and put build a basic mysql query it will probably be more efficient.
I also did think about allowing a file to create a static routes.php file. This is probably the best way of doing it as long as having a long routes.php file doesn't cause performance problems. Another thought was just to in the app_controller.php file in the beforeRender() function create a mod_rewrite file and then use $this- >redirect() to send it back to the same url path but now mod_rewrite will send it to the corresponding url. I hope that all makes sense. Scotty On Feb 26, 5:42 pm, Langdon Stevenson <[EMAIL PROTECTED]> wrote: > Just from looking at the routes.php file I can't see any reason why you > couldn't store route information in your database. All you would need > to do is query the data, then run a forloop over the result set calling > $Route->connect using the data from each record. > > I don't know if the database overhead would be prohibitive, but I can > imagine how this could be useful (similar to creating paths/links in > Drupal). > > You could also use the database table to pump out a static version of > the routes.php file if you really wanted to. > > It would be worth while testing routes when they are created or modified > before committing them. > > Regards, > Langdon > > > Over the last few days I have been trying to thinking of a way of > > easily and efficiently allow $Route-connect to be generated by a > > database table. This way I can organize my site better and make the > > urls look better. I know that I could do this from within routes.php, > > but there is potential for lots of routes. > > > Thanks Scotty --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
