File tree Expand file tree Collapse file tree 3 files changed +128
-146
lines changed Expand file tree Collapse file tree 3 files changed +128
-146
lines changed Original file line number Diff line number Diff line change @@ -343,8 +343,8 @@ the directory defined in the :ref:`default_path option <config-twig-default-path
343
343
twig :
344
344
# ...
345
345
paths :
346
- ' %kernel.project_dir%/ email/default/templates' : ~
347
- ' %kernel.project_dir%/ backend' : ' admin'
346
+ ' email/default/templates ' : ~
347
+ ' backend/templates ' : ' admin'
348
348
349
349
.. code-block :: xml
350
350
@@ -358,8 +358,8 @@ the directory defined in the :ref:`default_path option <config-twig-default-path
358
358
359
359
<twig : config >
360
360
<!-- ... -->
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 >
363
363
</twig : config >
364
364
</container >
365
365
@@ -369,8 +369,8 @@ the directory defined in the :ref:`default_path option <config-twig-default-path
369
369
$container->loadFromExtension('twig', [
370
370
// ...
371
371
'paths' => [
372
- '%kernel.project_dir%/ email/default/templates' => null,
373
- '%kernel.project_dir%/ backend' => 'admin',
372
+ 'email/default/templates' => null,
373
+ 'backend/templates ' => 'admin',
374
374
],
375
375
]);
376
376
Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ Returns an instance of ``ControllerReference`` to be used with functions
81
81
like :ref: `render() <reference-twig-function-render >` and
82
82
:ref: `render_esi() <reference-twig-function-render-esi >`.
83
83
84
+ .. _reference-twig-function-asset :
85
+
84
86
asset
85
87
~~~~~
86
88
@@ -102,7 +104,7 @@ Symfony provides various cache busting implementations via the
102
104
:ref: `reference-framework-assets-version `, :ref: `reference-assets-version-strategy `,
103
105
and :ref: `reference-assets-json-manifest-path ` configuration options.
104
106
105
- .. seelaso ::
107
+ .. seealso ::
106
108
107
109
Read more about :ref: `linking to web assets from templates <templates-link-to-assets >`.
108
110
@@ -235,17 +237,9 @@ absolute_url
235
237
``path ``
236
238
**type **: ``string ``
237
239
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 >`.
249
243
250
244
relative_path
251
245
~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments