This is an old version of this answer!
Return to the current answerHi,
the solution can be additional route like:
blog_archive:
url: /blog/archive/:year/:month/:page
class: sfDoctrineRoute
options: { model: Blog, type: list }
param: { module: blog, action: listArchive, page: 1 }
requirements:
year: \d+
month: \d+
sf_method: [get, post]
blog_archive_without_page:
url: /blog/archive/:year/:month
class: sfDoctrineRoute
options: { model: Blog, type: list }
param: { module: blog, action: listArchive, page: 1 }
requirements:
year: \d+
month: \d+
sf_method: [get, post]
And then call your pager navigation with <?php echo pager_navigation($pager, '@blog_archive_without_page?year='.$year.'&month='.$month) ?>
the solution can be additional route like:
blog_archive:
url: /blog/archive/:year/:month/:page
class: sfDoctrineRoute
options: { model: Blog, type: list }
param: { module: blog, action: listArchive, page: 1 }
requirements:
year: \d+
month: \d+
sf_method: [get, post]
blog_archive_without_page:
url: /blog/archive/:year/:month
class: sfDoctrineRoute
options: { model: Blog, type: list }
param: { module: blog, action: listArchive, page: 1 }
requirements:
year: \d+
month: \d+
sf_method: [get, post]
And then call your pager navigation with <?php echo pager_navigation($pager, '@blog_archive_without_page?year='.$year.'&month='.$month) ?>
Yura Rodchyn | 12/20/11 at 11:17am





