hi everyone,

thanks for your all your response. AD, you convinced me that title
based url are not as bad as I was thinking. However, can you clarify
more on using both id and title in the url. If I want to use both id
and title in the url, I have two options
1. http://findnwrite.com/memento/articles/details/1240/an_enterprise_GIS.
- traditional CakePHP way
2.http://findnwrite.com/memento/articles/details/id:1240/
title:an_enterprise_GIS.  - named arguments

It doesn't matter what option I use, but using id and title both in
the url solves my problem. The url gets more meaningful with the title
and I can still use the id field to do my queries. The title field in
the above url is then only for display purpose. Does any of you see a
potential problem with this. Once again thanks for all your comments.

@AD - thanks for spotting the spelling mistake on title page
@Geoff - thanks for spotting mistake on details page.

Regards,
Ritesh

On Jun 12, 4:24 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jun 12, 8:07 am, bingo <[EMAIL PROTECTED]> wrote:
>
> > hi AD,
>
> > I thought of doing so, but somehow I am not feeling comfortable with
> > finding articles by title.
>
> I should maybe clarify that I have (foolishly) been referring to the
> title and slug fields indiscriminately. An article would have (amongst
> others) these 3 fields:
>
> id int(pk)
> title string
> slug string (unique)
>
> You would search on the slug field, not the title field.
>
> Geoff the magic search methods (findBy* and findAllBy*) have been
> around for ages, including the funky find[All]byXAndY and
> find[All]byXOrY permutations (afaik - if it doesn't work, maybe I'm
> wrong :D ).
>
> 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