Skip to content

[FrameworkBundle][Routing] Removed context in template route config example #13048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ Rendering a Template Directly from a Route

Although templates are usually rendered in controllers and services, you can
render static pages that don't need any variables directly from the route
definition. Use the special ``TemplateController`` provided by Symfony:
definition. Use the special :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController`
provided by Symfony:

.. configuration-block::

Expand All @@ -476,10 +477,6 @@ definition. Use the special ``TemplateController`` provided by Symfony:
maxAge: 86400
sharedAge: 86400

# optionally you can define some arguments passed to the template
site_name: 'ACME'
theme: 'dark'

.. code-block:: xml

<!-- config/routes.xml -->
Expand All @@ -497,10 +494,6 @@ definition. Use the special ``TemplateController`` provided by Symfony:
<!-- special options defined by Symfony to set the page cache -->
<default key="maxAge">86400</default>
<default key="sharedAge">86400</default>

<!-- optionally you can define some arguments passed to the template -->
<default key="site_name">ACME</default>
<default key="theme">dark</default>
</route>
</routes>

Expand All @@ -520,10 +513,6 @@ definition. Use the special ``TemplateController`` provided by Symfony:
// special options defined by Symfony to set the page cache
'maxAge' => 86400,
'sharedAge' => 86400,

// optionally you can define some arguments passed to the template
'site_name' => 'ACME',
'theme' => 'dark',
])
;
};
Expand Down