php - Symfony Routing: sf_format default value


Having the following route:

    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?




param is where you can put default values.

 param: {module: blog, action: feedComments, sf_format: html }

People are also looking for solutions to the problem: php - Better to store phone in three fields or as one?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.