8000 Fixed a rebase error · symfony/symfony-docs@ab8fa54 · GitHub
[go: up one dir, main page]

Skip to content

Commit ab8fa54

Browse files
committed
Fixed a rebase error
1 parent c59cff6 commit ab8fa54

File tree

1 file changed

+0
-75
lines changed

1 file changed

+0
-75
lines changed

reference/configuration/framework.rst

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,81 +1256,6 @@ templating loaders. Templating loaders are used to find and load templates
12561256
from a resource (e.g. a filesystem or database). Templating loaders must
12571257
implement :class:`Symfony\\Component\\Templating\\Loader\\LoaderInterface`.
12581258

1259-
.. _reference-framework-assets-packages:
1260-
1261-
packages
1262-
........
1263-
1264-
You can group assets into packages, to specify different base URLs for them:
1265-
1266-
.. configuration-block::
1267-
1268-
.. code-block:: yaml
1269-
1270-
# app/config/config.yml
1271-
framework:
1272-
# ...
1273-
templating:
1274-
packages:
1275-
avatars:
1276-
base_urls: 'http://static_cdn.example.com/avatars'
1277-
1278-
.. code-block:: xml
1279-
1280-
<!-- app/config/config.xml -->
1281-
<?xml version="1.0" encoding="UTF-8" ?>
1282-
<container xmlns="http://symfony.com/schema/dic/services"
1283-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1284-
xmlns:framework="http://symfony.com/schema/dic/symfony"
1285-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1286-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1287-
1288-
<framework:config>
1289-
1290-
<framework:templating>
1291-
1292-
<framework:package
1293-
name="avatars"
1294-
base-url="http://static_cdn.example.com/avatars">
1295-
1296-
</framework:templating>
1297-
1298-
</framework:config>
1299-
</container>
1300-
1301-
.. code-block:: php
1302-
1303-
// app/config/config.php
1304-
$container->loadFromExtension('framework', array(
1305-
// ...
1306-
'templating' => array(
1307-
'packages' => array(
1308-
'avatars' => array(
1309-
'base_urls' => 'http://static_cdn.example.com/avatars',
1310-
),
1311-
),
1312-
),
1313-
));
1314-
1315-
Now you can use the ``avatars`` package in your templates:
1316-
1317-
.. configuration-block:: php
1318-
1319-
.. code-block:: html+jinja
1320-
1321-
<img src="{{ asset('...', 'avatars') }}">
1322-
1323-
.. code-block:: html+php
1324-
1325-
<img src="<?php echo $view['assets']->getUrl('...', 'avatars') ?>">
1326-
1327-
Each package can configure the following options:
1328-
1329-
* :ref:`base_urls <reference-templating-base-urls>`
1330-
* :ref:`version <reference-framework-assets-version>`
1331-
* :ref:`version_format <reference-templating-version-format>`
1332-
1333-
>>>>>>> Cookbook entry: Asset - Custom Version Strategy
13341259
translator
13351260
~~~~~~~~~~
13361261

0 commit comments

Comments
 (0)
0