Skip to content

Instantly share code, notes, and snippets.

@soullivaneuh
Created June 20, 2018 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soullivaneuh/890571009a2e1c2254f2e3fd696653a3 to your computer and use it in GitHub Desktop.
Save soullivaneuh/890571009a2e1c2254f2e3fd696653a3 to your computer and use it in GitHub Desktop.
<h4>This is row {{ i }}</h4>
/**
* @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,
]);
}
{% extends 'base.html.twig' %}
{% block body %}
{% for i in 0..25 %}
{{ render(controller('AppBundle:Default:partial', { i: i })) }}
{% endfor %}
{% endblock %}
{% 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