Thursday, January 6, 2011

Re: Bootstrap access to a model?

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 <mileswjohnson@gmail.com> 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 <gsker...@gmail.com> 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 <mileswjohn...@gmail.com> wrote:
> > Why are you allowing users to define routes?
>
> > On Jan 6, 8:59 am, majna <majna...@gmail.com> 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 <gsker...@gmail.com> 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.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 cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com 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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: