hi Jesse,

>  I was looking for a way to circumvent putting a "Router::connect...."
>  for each static page I have. Some of my sites have 100-150 static
>  pages. I'm looking for a way to dynamically build the routes for all
>  the pages.
>
>  My script I wrote does work, I was just looking for input from others
>  on ways to optimize my code a little, or to make sure I was using best
>  practices.

I like the idea, certainly very handy. That coupled with Gonzalo's
default route idea would make things really good. Some things I'd look
at to make things more cakey

1. Use cake's Folder class to obtain the files
2. Use App::import('component', 'PagesRoutesConfig'); // off top of
head, might be wrong!
3. What about making it work for dynamic pages as well? using
ClassRegistry::init('Page') in your component to get items from the
database
3a. If you do the above, you'll need to watch for duplicates

hth

Jon

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to