Skip to content

Commit 34c9d36

Browse files
committed
Add documentation about block parameter for #[Template]
1 parent dae3dfe commit 34c9d36

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

templates.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,8 @@ to define the template to render::
579579
class ProductController extends AbstractController
580580
{
581581
#[Template('product/index.html.twig')]
582+
// You can also add the "block" parameter to use the block inside the template
583+
#[Template('product/index.html.twig', block: 'main')]
582584
public function index(): array
583585
{
584586
// ...

0 commit comments

Comments
 (0)