[p2pu-dev] Using IDs for courses rather than slugs
Pieter Kleymeer
pkleij at gmail.com
Tue Sep 4 14:20:00 UTC 2012
A third option, though it might be a lot more database work, would be to
offer a URL alias field for each course. When a course is created, it would
be automatically assigned a unique ID (e.g., "/courses/465/"), which can
serve as the initial URL and the URL for all editing purposes
("/courses/465/edit"). But the owner/editor of the course can create an
alias URL (e.g., "/courses/the-quick-brown-fox/") that the end-user sees.
Drupal does this pretty well and it's especially nice for both creating
URLs that are user-friendly and being able to update the URL if you change
the name of the course or whatever.
On Friday, August 31, 2012 3:42:10 AM UTC-4, Dirk wrote:
>
> Hi everyone
>
> Stian mentioned this a while ago. It comes down to a URL being
> "/courses/465/" instead of "/courses/help-me-learn/".
>
> We have a few options:
>
> We can add the slug after the ID - "/courses/465/help-me-learn/". It
> won't really be used, so '/courses/465/the-quick-brown-fox/" would be
> equivalent.
>
> We can also try to resolve something like "/courses/help-me-learn/" to
> "/courses/465/help-me-learn/" if the slug exists. But if the slug then
> changes, "/courses/help-me-learn/" would return a 404 (page not
> found).
>
> Would everyone be happy if we simply used the ID ("/courses/465/") and
> what would the benefit be of adding a slug after the ID?
>
> Cheers
> Dirk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p2pu.org/pipermail/p2pu-dev/attachments/20120904/dea631ac/attachment.html>
More information about the p2pu-dev
mailing list