Thanks AD for your ideas.

My thinking is that if I store the whole slug in the slug field (ie
with the ancestors) then that will be a unique key to search for the
data from (I'll validate this to make sure it is). I guess I'll also
have to handle the fact that the user may change their location
setting, in which case a redirect to the correct URL based on the page
ID will be needed.

My problem now is to read the slug from the i18n table when looking up
the correct record in my 'pagina' table (that's just what I've called
it). How do I do this? Can you help?

On Feb 7, 9:04 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Feb 7, 8:34 pm, martinp <[EMAIL PROTECTED]> wrote:
>
> > I should maybe also add that I'm trying to also implement the
> > Translate Behaviour with this and the slug field would be hopefully be
> > translatable as well, so it has to read from the i18n table.
>
> I would recommend using urls of the form
> /a number/whatever/you/want
>
> or any url so long as you have something unique and in a specific
> place to find what you are looking for and
> where 'a number' is (probably) the id of the item with the slug "want"
>
> Then
>      Use the number to find what you are looking for;
>      Check the slug is what it should be and redirect to the correct
> id/slug if not
>      Move along, nothing to see here.
>
> if you want users to be able to type their own urls to find stuff;
> have /search/I/want/this redirect to /a number/I/want/this if it
> exists etc.
>
> Especially useful tactic if you want multilingual content to be
> reflected in the url.
>
> my 2c, hth,
>
> AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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