@@ -59,14 +59,14 @@ To include JavaScript files, use the ``javascripts`` tag in any template:
59
59
60
60
.. code-block :: html+jinja
61
61
62
- {% javascripts '@AcmeFooBundle /Resources/public/js/*' %}
62
+ {% javascripts '@AppBundle /Resources/public/js/*' %}
63
63
<script type="text/javascript" src="{{ asset_url }}"></script>
64
64
{% endjavascripts %}
65
65
66
66
.. code-block :: html+php
67
67
68
68
<?php foreach ($view['assetic']->javascripts(
69
- array('@AcmeFooBundle /Resources/public/js/*')
69
+ array('@AppBundle /Resources/public/js/*')
70
70
) as $url): ?>
71
71
<script type="text/javascript" src="<?php echo $view->escape($url) ?>"></script>
72
72
<?php endforeach ?>
@@ -81,7 +81,7 @@ To include JavaScript files, use the ``javascripts`` tag in any template:
81
81
82
82
{# ... #}
83
83
{% block javascripts %}
84
- {% javascripts '@AcmeFooBundle /Resources/public/js/*' %}
84
+ {% javascripts '@AppBundle /Resources/public/js/*' %}
85
85
<script type="text/javascript" src="{{ asset_url }}"></script>
86
86
{% endjavascripts %}
87
87
{% endblock %}
@@ -92,7 +92,7 @@ To include JavaScript files, use the ``javascripts`` tag in any template:
92
92
You can also include CSS Stylesheets: see :ref: `cookbook-assetic-including-css `.
93
93
94
94
In this example, all of the files in the ``Resources/public/js/ `` directory
95
- of the ``AcmeFooBundle `` will be loaded and served from a different location.
95
+ of the ``AppBundle `` will be loaded and served from a different location.
96
96
The actual rendered tag might simply look like:
97
97
98
98
.. code-block :: html
@@ -115,14 +115,14 @@ above, except with the ``stylesheets`` tag:
115
115
116
116
.. code-block :: html+jinja
117
117
118
- {% stylesheets 'bundles/acme_foo /css/*' filter='cssrewrite' %}
118
+ {% stylesheets 'bundles/app /css/*' filter='cssrewrite' %}
119
119
<link rel="stylesheet" href="{{ asset_url }}" />
120
120
{% endstylesheets %}
121
121
122
122
.. code-block :: html+php
123
123
124
124
<?php foreach ($view['assetic']->stylesheets(
125
- array('bundles/acme_foo /css/*'),
125
+ array('bundles/app /css/*'),
126
126
array('cssrewrite')
127
127
) as $url): ?>
128
128
<link rel="stylesheet" href="<?php echo $view->escape($url) ?>" />
@@ -138,7 +138,7 @@ above, except with the ``stylesheets`` tag:
138
138
139
139
{# ... #}
140
140
{% block stylesheets %}
141
- {% stylesheets 'bundles/acme_foo /css/*' filter='cssrewrite' %}
141
+ {% stylesheets 'bundles/app /css/*' filter='cssrewrite' %}
142
142
<link rel="stylesheet" href="{{ asset_url }}" />
143
143
{% endstylesheets %}
144
144
{% endblock %}
@@ -151,11 +151,11 @@ the :ref:`cssrewrite <cookbook-assetic-cssrewrite>` filter.
151
151
.. note ::
152
152
153
153
Notice that in the original example that included JavaScript files, you
154
- referred to the files using a path like ``@AcmeFooBundle /Resources/public/file.js ``,
154
+ referred to the files using a path like ``@AppBundle /Resources/public/file.js ``,
155
155
but that in this example, you referred to the CSS files using their actual,
156
- publicly-accessible path: ``bundles/acme_foo /css ``. You can use either, except
156
+ publicly-accessible path: ``bundles/app /css ``. You can use either, except
157
157
that there is a known issue that causes the ``cssrewrite `` filter to fail
158
- when using the ``@AcmeFooBundle `` syntax for CSS Stylesheets.
158
+ when using the ``@AppBundle `` syntax for CSS Stylesheets.
159
159
160
160
.. _cookbook-assetic-including-image :
161
161
@@ -168,14 +168,14 @@ To include an image you can use the ``image`` tag.
168
168
169
169
.. code-block :: html+jinja
170
170
171
- {% image '@AcmeFooBundle /Resources/public/images/example.jpg' %}
171
+ {% image '@AppBundle /Resources/public/images/example.jpg' %}
172
172
<img src="{{ asset_url }}" alt="Example" />
173
173
{% endimage %}
174
174
175
175
.. code-block :: html+php
176
176
177
177
<?php foreach ($view['assetic']->image(
178
- array('@AcmeFooBundle /Resources/public/images/example.jpg')
178
+ array('@AppBundle /Resources/public/images/example.jpg')
179
179
) as $url): ?>
180
180
<img src="<?php echo $view->escape($url) ?>" alt="Example" />
181
181
<?php endforeach ?>
@@ -198,7 +198,7 @@ You can see an example in the previous section.
198
198
.. caution ::
199
199
200
200
When using the ``cssrewrite `` filter, don't refer to your CSS files using
201
- the ``@AcmeFooBundle `` syntax. See the note in the above section for details.
201
+ the ``@AppBundle `` syntax. See the note in the above section for details.
202
202
203
203
Combining Assets
204
204
~~~~~~~~~~~~~~~~
@@ -215,7 +215,7 @@ but still serve them as a single file:
215
215
.. code-block :: html+jinja
216
216
217
217
{% javascripts
218
- '@AcmeFooBundle /Resources/public/js/*'
218
+ '@AppBundle /Resources/public/js/*'
219
219
'@AcmeBarBundle/Resources/public/js/form.js'
220
220
'@AcmeBarBundle/Resources/public/js/calendar.js' %}
221
221
<script src="{{ asset_url }}"></script>
@@ -225,7 +225,7 @@ but still serve them as a single file:
225
225
226
226
<?php foreach ($view['assetic']->javascripts(
227
227
array(
228
- '@AcmeFooBundle /Resources/public/js/*',
228
+ '@AppBundle /Resources/public/js/*',
229
229
'@AcmeBarBundle/Resources/public/js/form.js',
230
230
'@AcmeBarBundle/Resources/public/js/calendar.js',
231
231
)
@@ -254,17 +254,17 @@ combine third party assets, such as jQuery, with your own into a single file:
254
254
.. code-block :: html+jinja
255
255
256
256
{% javascripts
257
- '@AcmeFooBundle /Resources/public/js/thirdparty/jquery.js'
258
- '@AcmeFooBundle /Resources/public/js/*' %}
257
+ '@AppBundle /Resources/public/js/thirdparty/jquery.js'
258
+ '@AppBundle /Resources/public/js/*' %}
259
259
<script src="{{ asset_url }}"></script>
260
260
{% endjavascripts %}
261
261
262
262
.. code-block :: html+php
263
263
264
264
<?php foreach ($view['assetic']->javascripts(
265
265
array(
266
- '@AcmeFooBundle /Resources/public/js/thirdparty/jquery.js',
267
- '@AcmeFooBundle /Resources/public/js/*',
266
+ '@AppBundle /Resources/public/js/thirdparty/jquery.js',
267
+ '@AppBundle /Resources/public/js/*',
268
268
)
269
269
) as $url): ?>
270
270
<script src="<?php echo $view->escape($url) ?>"></script>
@@ -287,8 +287,8 @@ configuration under the ``assetic`` section. Read more in the
287
287
assets :
288
288
jquery_and_ui :
289
289
inputs :
290
- - ' @AcmeFooBundle /Resources/public/js/thirdparty/jquery.js'
291
- - ' @AcmeFooBundle /Resources/public/js/thirdparty/jquery.ui.js'
290
+ - ' @AppBundle /Resources/public/js/thirdparty/jquery.js'
291
+ - ' @AppBundle /Resources/public/js/thirdparty/jquery.ui.js'
292
292
293
293
.. code-block :: xml
294
294
@@ -299,8 +299,8 @@ configuration under the ``assetic`` section. Read more in the
299
299
300
300
<assetic : config >
301
301
<assetic : asset name =" jquery_and_ui" >
302
- <assetic : input >@AcmeFooBundle /Resources/public/js/thirdparty/jquery.js</assetic : input >
303
- <assetic : input >@AcmeFooBundle /Resources/public/js/thirdparty/jquery.ui.js</assetic : input >
302
+ <assetic : input >@AppBundle /Resources/public/js/thirdparty/jquery.js</assetic : input >
303
+ <assetic : input >@AppBundle /Resources/public/js/thirdparty/jquery.ui.js</assetic : input >
304
304
</assetic : asset >
305
305
</assetic : config >
306
306
</container >
@@ -312,8 +312,8 @@ configuration under the ``assetic`` section. Read more in the
312
312
'assets' => array(
313
313
'jquery_and_ui' => array(
314
314
'inputs' => array(
315
- '@AcmeFooBundle /Resources/public/js/thirdparty/jquery.js',
316
- '@AcmeFooBundle /Resources/public/js/thirdparty/jquery.ui.js',
315
+ '@AppBundle /Resources/public/js/thirdparty/jquery.js',
316
+ '@AppBundle /Resources/public/js/thirdparty/jquery.ui.js',
317
317
),
318
318
),
319
319
),
@@ -328,7 +328,7 @@ with the ``@named_asset`` notation:
328
328
329
329
{% javascripts
330
330
'@jquery_and_ui'
331
- '@AcmeFooBundle /Resources/public/js/*' %}
331
+ '@AppBundle /Resources/public/js/*' %}
332
332
<script src="{{ asset_url }}"></script>
333
333
{% endjavascripts %}
334
334
@@ -337,7 +337,7 @@ with the ``@named_asset`` notation:
337
337
<?php foreach ($view['assetic']->javascripts(
338
338
array(
339
339
'@jquery_and_ui',
340
- '@AcmeFooBundle /Resources/public/js/*',
340
+ '@AppBundle /Resources/public/js/*',
341
341
)
342
342
) as $url): ?>
343
343
<script src="<?php echo $view->escape($url) ?>"></script>
@@ -406,14 +406,14 @@ into your template:
406
406
407
407
.. code-block :: html+jinja
408
408
409
- {% javascripts '@AcmeFooBundle /Resources/public/js/*' filter='uglifyjs2' %}
409
+ {% javascripts '@AppBundle /Resources/public/js/*' filter='uglifyjs2' %}
410
410
<script src="{{ asset_url }}"></script>
411
411
{% endjavascripts %}
412
412
413
413
.. code-block :: html+php
414
414
415
415
<?php foreach ($view['assetic']->javascripts(
416
- array('@AcmeFooBundle /Resources/public/js/*'),
416
+ array('@AppBundle /Resources/public/js/*'),
417
417
array('uglifyjs2')
418
418
) as $url): ?>
419
419
<script src="<?php echo $view->escape($url) ?>"></script>
@@ -432,14 +432,14 @@ done from the template and is relative to the public document root:
432
432
433
433
.. code-block :: html+jinja
434
434
435
- {% javascripts '@AcmeFooBundle /Resources/public/js/*' output='js/compiled/main.js' %}
435
+ {% javascripts '@AppBundle /Resources/public/js/*' output='js/compiled/main.js' %}
436
436
<script src="{{ asset_url }}"></script>
437
437
{% endjavascripts %}
438
438
439
439
.. code-block :: html+php
440
440
441
441
<?php foreach ($view['assetic']->javascripts(
442
- array('@AcmeFooBundle /Resources/public/js/*'),
442
+ array('@AppBundle /Resources/public/js/*'),
443
443
array(),
444
444
array('output' => 'js/compiled/main.js')
445
445
) as $url): ?>
@@ -555,14 +555,14 @@ some isolated directory (e.g. ``/js/compiled``), to keep things organized:
555
555
556
556
.. code-block :: html+jinja
557
557
558
- {% javascripts '@AcmeFooBundle /Resources/public/js/*' output='js/compiled/main.js' %}
558
+ {% javascripts '@AppBundle /Resources/public/js/*' output='js/compiled/main.js' %}
559
559
<script src="{{ asset_url }}"></script>
560
560
{% endjavascripts %}
561
561
562
562
.. code-block :: html+php
563
563
564
564
<?php foreach ($view['assetic']->javascripts(
565
- array('@AcmeFooBundle /Resources/public/js/*'),
565
+ array('@AppBundle /Resources/public/js/*'),
566
566
array(),
567
567
array('output' => 'js/compiled/main.js')
568
568
) as $url): ?>
0 commit comments