Skip to content

Update formats.rst #7128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Update formats.rst #7128

wants to merge 5 commits into from

Conversation

ibronit
Copy link
Contributor

@ibronit ibronit commented Nov 9, 2016

In this case the $request->getRequestFormat() will give back "html" as default value. Possible solution is set _format as parameter in the route to overwrite the format. In my example without _format parameter it will render the article/index.html.twig and with pdf _format it will render the article/index.pdf.twig.

In this case the $request->getRequestFormat() will give back "html" as default value. Possible solution is set _format as parameter in the route to overwrite the format. In my example without _format parameter it will render the article/index.html.twig and with pdf _format it will render the article/index.pdf.twig.
@xabbuh
Copy link
Member

xabbuh commented Nov 12, 2016

I think we should add examples for the other config formats too. But we could do it all at once together with the other changes in #7129. What do you think?

@ibronit
Copy link
Contributor Author

ibronit commented Nov 14, 2016

@xabbuh Yep, we could, but I should have to make it before the approve.

@wouterj
Copy link
Member

wouterj commented Apr 15, 2017

Hi @berbadger! I'm very sorry, while finishing your other PR, I didn't realize you already made this PR to fix it! So I'm going to close this PR as well in favor of #7800 unfortunately.

@wouterj wouterj closed this Apr 15, 2017
@ibronit
Copy link
Contributor Author

ibronit commented Apr 18, 2017

:) I'm glad that you can use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants