> On Wed, Jun 4, 2008 at 6:11 PM,  <[EMAIL PROTECTED]> wrote:
>> Here is my problem though: I don't want to impact my users' sites,
>> meaning I want to keep their URLs intact and continue to use the same
>> underlying database containing sites and pages (where a record in the
>> "page" table has a URI, a parent id/URI, page content, an optional

I've been mulling over building a CMS using the URL structure you're
describing. Here's some of my thoughts on the matter:

1) You have two issues. One is trying to locate a resource based on
the URL, and the other is trying to create links to resources.

2) trying to locate a resource depends on what your data model is
like. You essentially need a central repository that acts as your site
map which consists of parent_ids and stubs/slugs for that resource.
Assuming resource stubs/slugs are unique, it'd be a simple matter of
retrieving from the database based on the last part of the URL. If
they're not unique then you need to check each part of the URL and
match it against a node in the tree. A little more "expensive". You
could denormalize your database to solve this problem by storing full
path names in an additional field and update it if an article is ever
moved or renamed.

3) if you're using the denormalized approach, outputting URLs is
simple enough. otherwise, you'll have to navigate the tree for each
node every time you want to output a link.

4) in Cake, in order to be able to take the URL and map it out. You
could try URL rewriting and take /part/part/part/ and convert it into
/part-part-part/ (or some other delimiter that's Cake-friendly).
Otherwise, you'll probably have to hack up the dispatcher to do what
you want.

Best of luck,

-Jonathan

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to