Skip to content

Fixed the ESI render example code to work with symfony 2.1 #2304

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

Merged
merged 1 commit into from
Mar 30, 2013

Conversation

paran01d
Copy link

Q A
Doc fix? yes
New docs? no
Applies to 2.1
Fixed tickets #2303

First time doing this so I hope its ok.

@lyrixx
Copy link
Member

lyrixx commented Mar 13, 2013

AFAIR, the render, function exists in symfony 2.1. since the function is more flexible than the tag, we should to only document the function

@paran01d
Copy link
Author

can you provide an example of using the render function (i know nothing about it) and ill happily update.

@lyrixx
Copy link
Member

lyrixx commented Mar 14, 2013

For 2.2 it is:
{{ render_esi(url('BlogBundle:Post:list', { 'limit': 2 }), { 'alt': 'BlogBundle:Post:error'}) }}.

I'm not sure, but i Think for 2.1 it is:
{{ render(url('BlogBundle:Post:list', { 'limit': 2 }), { 'alt': 'BlogBundle:Post:error', 'standalone' : true}) }}

@stof
Copy link
Member

stof commented Mar 19, 2013

@lyrixx The render function is new in 2.2. 2.1 only supports the tag: https://github.com/symfony/symfony/blob/2.1/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php

@paran01d
Copy link
Author

and 2.1 also seems to require with {} part or it causes a syntax error from twig.

@stof
Copy link
Member

stof commented Mar 20, 2013

@paran01d indeed. The current PR is right. the change suugested by @lyrixx is not

@lyrixx
Copy link
Member

lyrixx commented Mar 20, 2013

Sorry. :(

weaverryan added a commit that referenced this pull request Mar 30, 2013
Fixed the ESI render example code to work with symfony 2.1
@weaverryan weaverryan merged commit 6243847 into symfony:2.1 Mar 30, 2013
@weaverryan
Copy link
Member

Thanks everyone! I fixed one other instance I found at sha: 6658c97

@paran01d This was a perfect PR and contribution - especially great for your first time!

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

Successfully merging this pull request may close these issues.

4 participants