I am experiencing an issue trying to reference a particular Twig template. I am using the render
method that is part of the SF2 main controller, but I clearly not referencing/using it correctly.
This is my directory/file structure:
/src
/AyrshireMinis
/CommonBundle
/Controller
DefaultController.php
/Entity
Link.php
/Resources
/views
/Default
links.html.twig
and this is the method called by the router in DefaultContoller.php
:
/**
* @Route("/links", name="ayrshireminis_links")
* @Template()
*/
public function linksAction()
{
$links = $this->getDoctrine()->getRepository('AyrshireMinisCommonBundle:Link')->findAll();
return $this->render('AyrshireMinisCommonBundle:Link:links.html.twig', array('links' => $links));
}
But this is the error I get:
Unable to find template "AyrshireMinisCommonBundle:Link:links.html.twig".