Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony Routing: sf_format default value

Having the following route:

  blog_rss_comments:
    url:     /blog/feeds/:type/comments.:sf_format
    param: {module: blog, action: feedComments }
    requirements: { sf_method: get, sf_format: (?:rss|xml|html) }

Is it possible to add a default-sf_format setting, so I do not have to pass sf_format every time?

like image 252
worenga Avatar asked Dec 07 '25 06:12

worenga


1 Answers

param is where you can put default values.

 param: {module: blog, action: feedComments, sf_format: html }
like image 150
Crozin Avatar answered Dec 09 '25 19:12

Crozin