Skip to content

Commit 260293e

Browse files
committed
First round of reviews
1 parent 9c50c2d commit 260293e

File tree

3 files changed

+128
-146
lines changed

3 files changed

+128
-146
lines changed

reference/configuration/twig.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ the directory defined in the :ref:`default_path option <config-twig-default-path
343343
twig:
344344
# ...
345345
paths:
346-
'%kernel.project_dir%/email/default/templates': ~
347-
'%kernel.project_dir%/backend': 'admin'
346+
'email/default/templates': ~
347+
'backend/templates': 'admin'
348348
349349
.. code-block:: xml
350350
@@ -358,8 +358,8 @@ the directory defined in the :ref:`default_path option <config-twig-default-path
358358
359359
<twig:config>
360360
<!-- ... -->
361-
<twig:path>%kernel.project_dir%/email/default/templates</twig:path>
362-
<twig:path namespace="admin">%kernel.project_dir%/backend</twig:path>
361+
<twig:path>email/default/templates</twig:path>
362+
<twig:path namespace="admin">backend/templates</twig:path>
363363
</twig:config>
364364
</container>
365365
@@ -369,8 +369,8 @@ the directory defined in the :ref:`default_path option <config-twig-default-path
369369
$container->loadFromExtension('twig', [
370370
// ...
371371
'paths' => [
372-
'%kernel.project_dir%/email/default/templates' => null,
373-
'%kernel.project_dir%/backend' => 'admin',
372+
'email/default/templates' => null,
373+
'backend/templates' => 'admin',
374374
],
375375
]);
376376

reference/twig_reference.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Returns an instance of ``ControllerReference`` to be used with functions
8181
like :ref:`render() <reference-twig-function-render>` and
8282
:ref:`render_esi() <reference-twig-function-render-esi>`.
8383

84+
.. _reference-twig-function-asset:
85+
8486
asset
8587
~~~~~
8688

@@ -102,7 +104,7 @@ Symfony provides various cache busting implementations via the
102104
:ref:`reference-framework-assets-version`, :ref:`reference-assets-version-strategy`,
103105
and :ref:`reference-assets-json-manifest-path` configuration options.
104106

105-
.. seelaso::
107+
.. seealso::
106108

107109
Read more about :ref:`linking to web assets from templates <templates-link-to-assets>`.
108110

@@ -235,17 +237,9 @@ absolute_url
235237
``path``
236238
**type**: ``string``
237239

238-
Returns the absolute URL from the passed relative path. For example, assume
239-
you're on the following page in your app:
240-
``http://example.com/products/hover-board``.
241-
242-
.. code-block:: twig
243-
244-
{{ absolute_url('/human.txt') }}
245-
{# http://example.com/human.txt #}
246-
247-
{{ absolute_url('products_icon.png') }}
248-
{# http://example.com/products/products_icon.png #}
240+
Returns the absolute URL from the passed relative path. Combine it with the
241+
:ref:`asset() function <reference-twig-function-asset>` to generate absolute URLs
242+
for web assets. Read more about :ref:`Linking to CSS, JavaScript and Image Assets <templates-link-to-assets>`.
249243

250244
relative_path
251245
~~~~~~~~~~~~~

0 commit comments

Comments
 (0)