[eluser]Unknown[/eluser]
I have an events controller linked to a calendar and instead of using links like:
/events/view/345
I would like to utilize something like: /events/2012/1/10/event-name-here
I have no problem generating the SEO friendly version of the link using url_title(), or using routes to map it correctly, the question I have is with database lookups.
Using /events/view/345 I can get the event in the database using the event id (345), however if I switch to an SEO friendly url, I lose the event id. Is it safe enough to look up the record in the database using the year/month/day and event-name, or is there someway I can pass the ID (without using POST) and hide it in the SEO friendly url?
For example, the link would look like:
/events/2012/1/10/event-name-here
But when it is passed to the controller behind the scenes it is actually:
/events/2012/1/10/345
Is this doable?