ah nice, thanks for pointing that out.
On Fri, Jan 7, 2011 at 12:29 PM, Miles J <[email protected]> wrote: > Yeah, I have done exactly this before :] > > https://github.com/milesj/cake-forum/blob/master/models/setting.php > > On Jan 6, 5:00 pm, Greg Skerman <[email protected]> wrote: > > is it worth wrapping it all up in a DB tableless model to take advantage > of > > validation magic and so forth? > > > > On Fri, Jan 7, 2011 at 10:44 AM, Miles J <[email protected]> > wrote: > > > Saving the routes to a file will probably be much easier and less > > > error prone then trying to connect to the database during the > > > bootstrap process. Most likely less logic required also. > > > > > On Jan 6, 4:13 pm, Greg Skerman <[email protected]> wrote: > > > > they wont be editing the php files themselves, no.... unless they > want > > > to.. > > > > but i'm trying to provide an option that doesn't require them to know > how > > > to > > > > code to do it.... > > > > > > I intended on caching the result from the DB which would be akin to > > > > serializing an array and saving to the file system.....db just seemed > > > like a > > > > logical place to persist it.... > > > > > > On Fri, Jan 7, 2011 at 9:44 AM, Miles J <[email protected]> > wrote: > > > > > I guess I still don't understand why a database is needed for this? > > > > > Are they not going to be editing the PHP files themselves? > > > > > > > If they aren't, then just save the "routes" as a serialized array > into > > > > > the filesystem and load that everytime instead of hitting the > > > > > database. > > > > > > > On Jan 6, 3:41 pm, Greg Skerman <[email protected]> wrote: > > > > > > Miles, not users, site admins. > > > > > > The reason i want them to be able to define routes is so they can > > > define > > > > > > their URL structure themselves, and not have it imposed on them > by > > > the > > > > > > content management system.... > > > > > > > > suppose they have > > > > > > /articles/1 > > > > > > /articles/2 > > > > > > /articles/3 > > > > > > > > but want them to be accessed as: > > > > > > > > /products > > > > > > /products/services > > > > > > /about > > > > > > > > ...basically i want a way that they can add content to the site, > and > > > then > > > > > > arrange the URLs in anyway they see fit..... > > > > > > > > On Fri, Jan 7, 2011 at 4:24 AM, Miles J <[email protected] > > > > > wrote: > > > > > > > Why are you allowing users to define routes? > > > > > > > > > On Jan 6, 8:59 am, majna <[email protected]> wrote: > > > > > > > > http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > > > > > > > But this will break reverse routing, if used. All routes must > be > > > > > > > > "connected" for reverse routing to work. > > > > > > > > > > On Jan 6, 4:57 am, Greg Skerman <[email protected]> wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > So i've ditched the idea of having one controller call > another. > > > > > > > Instead, > > > > > > > > > i've decided a better approach might be to use routes, and > have > > > > > > > "custom" > > > > > > > > > routes stored in a database, added at runtime in > bootstrap.php, > > > and > > > > > of > > > > > > > > > course cached. > > > > > > > > > > > This will allow people to define their own simple routes > for > > > site > > > > > map > > > > > > > > > organization. > > > > > > > > > > > So, I know I can probably use App::Import('Controller', > > > > > > > 'CustomRoutes'); in > > > > > > > > > bootstrap, and manually initialize the class, but are there > any > > > > > reasons > > > > > > > why > > > > > > > > > i shouldn't do this? I'd appreciate thoughts on whether > > > > > bootstrapping a > > > > > > > > > controller/model is a good thing or a bad thing. > > > > > > > > > > > Have at it :) > > > > > > > > > Check out the new CakePHP Questions > sitehttp://cakeqs.organdhelp > > > > > others > > > > > > > with their CakePHP related questions. > > > > > > > > > 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]<cake-php%[email protected]> > <cake-php%[email protected]<cake-php%[email protected]> > > > > > <cake-php%[email protected]<cake-php%[email protected]> > <cake-php%[email protected]<cake-php%[email protected]> > > > > > > > > > <cake-php%[email protected]<cake-php%[email protected]> > <cake-php%[email protected]<cake-php%[email protected]> > > > > > <cake-php%[email protected]<cake-php%[email protected]> > <cake-php%[email protected]<cake-php%[email protected]> > > > > > >>For > > > > > more options, visit this group at > > > > > > >http://groups.google.com/group/cake-php?hl=en > > > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > > others > > > > > with their CakePHP related questions. > > > > > > > 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]<cake-php%[email protected]> > <cake-php%[email protected]<cake-php%[email protected]> > > > > > <cake-php%[email protected]<cake-php%[email protected]> > <cake-php%[email protected]<cake-php%[email protected]> > >>For > > > more options, visit this group at > > > > >http://groups.google.com/group/cake-php?hl=en > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help > others > > > with their CakePHP related questions. > > > > > 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]<cake-php%[email protected]> > <cake-php%[email protected]<cake-php%[email protected]>>For > more options, visit this group at > > >http://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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]<cake-php%[email protected]>For > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
