Skip to content

Commit 261c1e8

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Reworded all the docs related to templates and Twig
2 parents 9776a37 + 3ce905a commit 261c1e8

30 files changed

+1299
-1968
lines changed

_build/redirection_map

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,3 +446,13 @@
446446
/form/action_method /forms
447447
/reference/requirements /setup
448448
/bundles/inheritance /bundles/override
449+
/templating /templates
450+
/templating/escaping /templates
451+
/templating/syntax /templates
452+
/templating/debug /templates
453+
/templating/render_without_controller /templates
454+
/templating/app_variable /templates
455+
/templating/formats /templates
456+
/templating/namespaced_paths /templates
457+
/templating/embedding_controllers /templates
458+
/templating/inheritance /templates

components/http_foundation.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ which is almost equivalent to the more verbose, but also more flexible,
5757
$_SERVER
5858
);
5959

60+
.. _accessing-request-data:
61+
6062
Accessing Request Data
6163
~~~~~~~~~~~~~~~~~~~~~~
6264

components/templating.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Usage
2828
.. seealso::
2929

3030
This article explains how to use the Templating features as an independent
31-
component in any PHP application. Read the :doc:`/templating` article to
32-
learn about how to work with templates in Symfony applications.
31+
component in any PHP application. Read the article about :doc:`templates </templates>`
32+
to learn about how to work with templates in Symfony applications.
3333

3434
The :class:`Symfony\\Component\\Templating\\PhpEngine` class is the entry point
3535
of the component. It needs a
@@ -211,5 +211,5 @@ Learn More
211211
:glob:
212212

213213
/components/templating/*
214-
/templating
214+
/templates
215215
/templating/*

configuration/front_controllers_and_kernel.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ new kernel.
123123
.. index::
124124
single: Configuration; Debug mode
125125

126+
.. _debug-mode:
127+
126128
Debug Mode
127129
~~~~~~~~~~
128130

controller.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ object for you::
179179
return $this->render('lucky/number.html.twig', ['number' => $number]);
180180

181181
Templating and Twig are explained more in the
182-
:doc:`Creating and Using Templates article </templating>`.
182+
:doc:`Creating and Using Templates article </templates>`.
183183

184184
.. index::
185185
single: Controller; Accessing services
@@ -461,7 +461,8 @@ and then redirects. The message key (``notice`` in this example) can be anything
461461
you'll use this key to retrieve the message.
462462

463463
In the template of the next page (or even better, in your base layout template),
464-
read any flash messages from the session using ``app.flashes()``:
464+
read any flash messages from the session using the ``flashes()`` method provided
465+
by the :ref:`Twig global app variable <twig-app-variable>`:
465466

466467
.. code-block:: html+twig
467468

@@ -650,15 +651,15 @@ handle caching and more.
650651
Keep Going!
651652
-----------
652653

653-
Next, learn all about :doc:`rendering templates with Twig </templating>`.
654+
Next, learn all about :doc:`rendering templates with Twig </templates>`.
654655

655656
Learn more about Controllers
656657
----------------------------
657658

658659
.. toctree::
659660
:hidden:
660661

661-
templating
662+
templates
662663

663664
.. toctree::
664665
:maxdepth: 1

event_dispatcher.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ Request Events, Checking Types
206206
------------------------------
207207

208208
A single page can make several requests (one master request, and then multiple
209-
sub-requests - typically by :doc:`/templating/embedding_controllers`). For the core
210-
Symfony events, you might need to check to see if the event is for a "master" request
211-
or a "sub request"::
209+
sub-requests - typically when :ref:`embedding controllers in templates <templates-embed-controllers>`).
210+
For the core Symfony events, you might need to check to see if the event is for
211+
a "master" request or a "sub request"::
212212

213213
// src/EventListener/RequestListener.php
214214
namespace App\EventListener;

getting_started/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ Getting Started
88
/page_creation
99
/routing
1010
/controller
11-
/templating
11+
/templates
1212
/configuration

http_cache/esi.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ independently of the rest of the page::
114114

115115
In this example, the full-page cache has a lifetime of ten minutes.
116116
Next, include the news ticker in the template by embedding an action.
117-
This is done via the ``render`` helper (see :doc:`/templating/embedding_controllers`
118-
for more details).
117+
This is done via the ``render()`` helper (for more details, see how to
118+
:ref:`embed controllers in templates <templates-embed-controllers>`).
119119

120120
As the embedded content comes from another page (or controller for that
121121
matter), Symfony uses the standard ``render`` helper to configure ESI tags:

introduction/from_flat_php_to_symfony.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ a simple application. Along the way, you've made a simple routing
532532
system and a method using ``ob_start()`` and ``ob_get_clean()`` to render
533533
templates. If, for some reason, you needed to continue building this "framework"
534534
from scratch, you could at least use Symfony's standalone
535-
:doc:`Routing </components/routing>` component and :doc:`Twig </templating>`,
535+
:doc:`Routing </components/routing>` component and :doc:`Twig </templates>`,
536536
which already solve these problems.
537537

538538
Instead of re-solving common problems, you can let Symfony take care of

mailer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ create an event subscriber to set it automatically::
293293
Twig: HTML & CSS
294294
----------------
295295

296-
The Mime component integrates with the :doc:`Twig template engine </templating>`
296+
The Mime component integrates with the :ref:`Twig template engine <twig-language>`
297297
to provide advanced features such as CSS style inlining and support for HTML/CSS
298298
frameworks to create complex HTML email messages. First, make sure Twig is installed:
299299

0 commit comments

Comments
 (0)