8000 Added the description of the new base_path option · symfony/symfony-docs@fccd261 · GitHub
[go: up one dir, main page]

Skip to content

Commit fccd261

Browse files
committed
Added the description of the new base_path option
1 parent 49221c2 commit fccd261

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

reference/configuration/framework.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,30 @@ assets
424424
The ``assets`` option was introduced in Symfony 2.7. Prior to Symfony
425425
2.7, the ``templating`` option provided equivalent configuration options.
426426

427+
base_path
428+
.........
429+
430+
**default**: ``''`` (empty string)
431+
432+
.. versionadded:: 2.7
433+
The ``base_path`` option was introduced in Symfony 2.7.
434+
435+
The path to prepend when generating the asset's relative URL. For example, if
436+
the application defines the following configuration:
437+
438+
.. code-block:: yaml
439+
440+
# app/config/config.yml
441+
framework:
442+
assets:
443+
base_path: static/images/
444+
445+
The ``asset('logos/default.png')`` function will no longer generate the
446+
``/logos/default.png`` relative URL but ``/static/images/logos/default.png``.
447+
448+
The value of the ``base_path`` option is appended after the global base path
449+
defined in the ``router.request_context.base_url`` option (if any).
450+
427451
base_urls
428452
.........
429453

0 commit comments

Comments
 (0)
0