Skip to content

Commit 21e528f

Browse files
committed
Minor simplification
1 parent 865e476 commit 21e528f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

templates.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,8 @@ use the ``render()`` helper::
401401
{
402402
// ...
403403

404-
// pass the template path to render
405-
return $this->render('product/index.html.twig');
406-
407-
// the second optional argument is an array of variables passed to the template
408404
return $this->render('product/index.html.twig', [
409-
'categories' => '...',
405+
'category' => '...',
410406
'promotions' => ['...', '...'],
411407
]);
412408
}
@@ -441,7 +437,7 @@ the :class:`Twig\Environment` class::
441437
// ...
442438

443439
$htmlContents = $this->twig->render('product/index.html.twig', [
444-
'categories' => '...',
440+
'category' => '...',
445441
'promotions' => ['...', '...'],
446442
]);
447443
}

0 commit comments

Comments
 (0)