Skip to content

Commit

Permalink
Remove sidebar action and call Template Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiu-popa committed Dec 7, 2015
1 parent e1868eb commit c4b3816
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 2 additions & 1 deletion app/Resources/views/base.html.twig
Expand Up @@ -105,7 +105,8 @@

<div id="sidebar" class="col-sm-3">
{% block sidebar %}
{{ render_esi(controller('AppBundle:Blog:sidebar')) }}
{{ render_esi(controller('FrameworkBundle:Template:template',
{ 'template': 'blog/sidebar.html.twig', 'sharedAge': 600 })) }}
{% endblock %}
</div>
</div>
Expand Down
8 changes: 0 additions & 8 deletions src/AppBundle/Controller/BlogController.php
Expand Up @@ -50,14 +50,6 @@ public function indexAction($page)
return $response;
}

public function sidebarAction()
{
$response = $this->render('blog/sidebar.html.twig');
$response->setSharedMaxAge(600); // cached for 10 minutes

return $response;
}

/**
* @Route("/posts/{slug}", name="blog_post")
*
Expand Down

0 comments on commit c4b3816

Please sign in to comment.