Skip to content

Commit bf737c3

Browse files
author
Benjamin RICHARD
committed
[FrameworkBundle] Template Controller should accept extra arguments fix #12929
1 parent e4d8832 commit bf737c3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

templates.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,9 @@ definition. Use the special ``TemplateController`` provided by Symfony:
477477
sharedAge: 86400
478478
479479
# optionally you can define some arguments passed to the template
480-
site_name: 'ACME'
481-
theme: 'dark'
480+
context:
481+
site_name: 'ACME'
482+
theme: 'dark'
482483
483484
.. code-block:: xml
484485
@@ -499,8 +500,10 @@ definition. Use the special ``TemplateController`` provided by Symfony:
499500
<default key="sharedAge">86400</default>
500501
501502
<!-- optionally you can define some arguments passed to the template -->
502-
<default key="site_name">ACME</default>
503-
<default key="theme">dark</default>
503+
<default key="context">
504+
<default key="site_name">ACME</default>
505+
<default key="theme">dark</default>
506+
</default>
504507
</route>
505508
</routes>
506509
@@ -522,8 +525,10 @@ definition. Use the special ``TemplateController`` provided by Symfony:
522525
'sharedAge' => 86400,
523526
524527
// optionally you can define some arguments passed to the template
525-
'site_name' => 'ACME',
526-
'theme' => 'dark',
528+
'context' => [
529+
'site_name' => 'ACME',
530+
'theme' => 'dark',
531+
]
527532
])
528533
;
529534
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy