Hi I've a problem with doctrineRoute in routing...

I've an object Article which has some pages ordered by rank.
I would like to take the first page when 'page' isn't specified and
take the associated page when 'page' is specified.
So When I specify a page, it plays the function (getRank) and it takes
the first page... How I can do to not play the function when I
specified a page?

Example:

The routing file
article_show:
  url:     /article/:id/page/:rank.html
  class:   sfDoctrineRoute
  options: { model: Article, type: object }
  param:   { module: article, action: show }
  requirements:
    id:        \d+
        rank:      \d+
    sf_method: [get]

Generates Url,($article is an Article instance) :
url_for('article_show', $article)
waiting : /article/1/page/1.html
result  : /article/1/page/1.html

url_for('article_show', array('sf_subject' => $article, 'rank' => 2))
Waiting != Result
waiting : /article/1/page/2.html
result  : /article/1/page/1.html

Thanks.

--~--~---------~--~----~------------~-------~--~----~
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