The pages on my website are hierarchicaly structured as a tree, and one of the mandatory requests for the website is to represent the page hierarchy in the URLs. The pages and their relationships are defined in a database table. So, what I would like to do is query the database (and cache the results - if I understood correctly, CakePHP makes such caching possible) and generate custom routes according to the page paths.
For an example, this is the hieararchy (I know it's deep, but just to draw the picture) for a targeted page which has its own controller: Page1 -> Page2 -> Page3 -> TargetedPage Id like to have the address looking like this: www.example.com/page1/page2/page3/targeted-page, so 'page1/page2/page3/targeted-page' would be the matching url for the page controller. The default Cake's setup doesn't work very well for me here. I know writing a simple query breaks the MVC principles, so is using a controller and an appropriate model the right way to do this? On 9 tra, 03:35, Miles J <mileswjohn...@gmail.com> wrote: > How would information from adatabasebe used to make customroutes? > Why not just use Cakes default setup. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---