Created
June 20, 2018 10:51
-
-
Save soullivaneuh/890571009a2e1c2254f2e3fd696653a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h4>This is row {{ i }}</h4> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Route("/for", name="for") | |
*/ | |
public function forAction(Request $request) | |
{ | |
return $this->render( | |
$request->query->has('embed') | |
? 'default/for_embed.html.twig' | |
: 'default/for_include.html.twig' | |
); | |
} | |
public function partialAction(int $i) | |
{ | |
return $this->render('default/_partial.html.twig', [ | |
'i' => $i, | |
]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.html.twig' %} | |
{% block body %} | |
{% for i in 0..25 %} | |
{{ render(controller('AppBundle:Default:partial', { i: i })) }} | |
{% endfor %} | |
{% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.html.twig' %} | |
{% block body %} | |
{% for i in 0..25 %} | |
{% include 'default/_partial.html.twig' %} | |
{% endfor %} | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment