Bonsoir tout le monde,
Je viens de deployer mon application, et j'ai un soucis avec une de mes vues que je n'ai pas en local.
Unable to find template "offer/_offer.html.twig " (looked into: /home/u726646235/public_html/studyjob/templates, /home/u726646235/public_html/studyjob/vendor/symfony/twig-bridge/Resources/views/Form) in offer/index.html.twig at line 12.
Au niveau de mon arborescence j'ai :
offer
|_ _offer.html.twig
|_ index.html.twig
Voici l'action de mon controller par rapport à ma vue :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| /**
* @Route("/offers/{page<\d+>?1}", name="offers_index")
*/
public function index(OfferRepository $repo, $page)
{
$limit = 9;
$start = $page * $limit - $limit;
$total = count($repo->findAll());
$pages = ceil($total / $limit);
return $this->render('offer/index.html.twig', [
'offers' => $repo->findBy([], [], $limit, $start),
'pages' => $pages,
'page' => $page
]);
} |
Merci d'avance.
J'ai oublié de préciser que ma vue _offer.html.twig est include dans index.html.twig.
Partager