I would like to configure view.yml per environment.
In production:
default:
http_metas:
content-type: text/json
In dev:
default:
http_metas:
content-type: text/html
I need this because I want to debug json response with web debug toolbar. So, I basically need to set content type of response per environment. Is it possible to do it yml? If not, what's the right place to hook into?
You cannot do it in view.yml without rewriting the entire view config handler. I suppose there are a couple of alternatives for this specific example:
You could use the ysfDimensionsPlugin which allows you to specify different dimensions with different config files.
You could achieve this by adding or extending a filter in the filter chain, I suppose I would do this by extending sfRenderingFilter.
If however, you just want to inspect JSON output, why not use Firebug or Web Inspector?