I think the "trick" is to use the column option in param

Something like this:
options: { model: Blog, type: object, column: subject_slug }

Another interesting params are model_methods..
http://www.symfony-project.org/advent_calendar/3/en


On 10 led, 13:14, dziobacz <[email protected]> wrote:
> sfDoctrineRoute works only with at least one variable which represents
> real column from table in url ?
>
> I have in routing.yml:
> show_blog:
>   url:   /blog/:subject_slug
>   class:   sfDoctrineRoute
>   options: { model: Blog, type: object }
>   param: { module: blog, action: index }
>
> :subject_slug isn't real column in model Blog (:subject_slug is like a
> real column :subject in model Blog but without non ASCII characters)
> and after clicked on link (where $b is object):
> link_to( 'link', 'show_blog', $b );
> URL in browser is different but I am still on the same page. When I
> modify url in routing to:
> url:   /blog/:id/:subject_slug OR url:   /blog/:subject
> where :id and :subject are real columns in model Blog then everything
> is ok.
>
> So url in sfDoctrineRoute must have at least one variable which is a
> real column, in other case they won't work ?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to