@@ -70,6 +70,7 @@ Configuration
70
70
* `gc_maxlifetime `_
71
71
* `save_path `_
72
72
* `assets `_
73
+ * `base_path `_
73
74
* `base_urls `_
74
75
* `packages `_
75
76
* `version `_
@@ -852,6 +853,48 @@ setting the value to ``null``:
852
853
assets
853
854
~~~~~~
854
855
856
+ .. _reference-assets-base-path :
857
+
858
+ base_path
859
+ .........
860
+
861
+ **type **: ``string ``
862
+
863
+ This option allows you to define a base path to be used for assets:
864
+
865
+ .. configuration-block ::
866
+
867
+ .. code-block :: yaml
868
+
869
+ # app/config/config.yml
870
+ framework :
871
+ # ...
872
+ assets :
873
+ base_path : ' /images'
874
+
875
+ .. code-block :: xml
876
+
877
+ <!-- app/config/config.xml -->
878
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
879
+ <container xmlns =" http://symfony.com/schema/dic/services"
880
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
881
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
882
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
883
+ http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
884
+
885
+ <framework : assets base_path =" /images" >
886
+ </container >
887
+
888
+ .. code-block :: php
889
+
890
+ // app/config/config.php
891
+ $container->loadFromExtension('framework', array(
892
+ // ...
893
+ 'assets' => array(
894
+ 'base_path' => '/images',
895
+ ),
896
+ ));
897
+
855
898
.. _reference-templating-base-urls :
856
899
.. _reference-assets-base-urls :
857
900
@@ -967,6 +1010,7 @@ Now you can use the ``avatars`` package in your templates:
967
1010
968
1011
Each package can configure the following options:
969
1012
1013
+ * :ref: `base_path <reference-assets-base-path >`
970
1014
* :ref: `base_urls <reference-assets-base-urls >`
971
1015
* :ref: `version <reference-framework-assets-version >`
972
1016
* :ref: `version_format <reference-assets-version-format >`
@@ -1526,16 +1570,18 @@ Full Default Configuration
1526
1570
1527
1571
# assets configuration
1528
1572
assets :
1573
+ base_path : ~
1574
+ base_urls : []
1529
1575
version : ~
1530
1576
version_format : ' %%s?%%s'
1531
- base_urls : []
1532
1577
packages :
1533
1578
1534
1579
# Prototype
1535
1580
name :
1581
+ base_path : ~
1582
+ base_urls : []
1536
1583
version : ~
1537
1584
version_format : ' %%s?%%s'
1538
- base_urls : []
1539
1585
1540
1586
# templating configuration
1541
1587
templating :
0 commit comments