@@ -71,22 +71,23 @@ the view layer, this work is done in your templates:
71
71
72
72
.. code-block :: html+jinja
73
73
74
- {% javascripts 'js/src /*' filter='yui_js' %}
74
+ {% javascripts '@AcmeFooBundle/Resources/public/js /*' filter='yui_js' %}
75
75
<script src="{{ asset_url }}"></script>
76
76
{% endjavascripts %}
77
77
78
78
.. code-block :: html+php
79
79
80
80
<?php foreach ($view['assetic']->javascripts(
81
- array('js/src /*'),
81
+ array('@AcmeFooBundle/Resources/public/js /*'),
82
82
array('yui_js')) as $url): ?>
83
83
<script src="<?php echo $view->escape($url) ?>"></script>
84
84
<?php endforeach; ?>
85
85
86
86
.. note ::
87
87
88
- The above example assumes that your JavaScript files are in the ``js/src ``
89
- directory. This isn't important however - you can include your Javascript
88
+ The above example assumes that you have a bundle called ``AcmeFooBundle ``
89
+ and your JavaScript files are in the ``Resources/public/js `` directory under
90
+ your bundle. This isn't important however - you can include your Javascript
90
91
files no matter where they are.
91
92
92
93
With the addition of the ``yui_js `` filter to the asset tags above, you should
@@ -97,14 +98,14 @@ can be repeated to minify your stylesheets.
97
98
98
99
.. code-block :: html+jinja
99
100
100
- {% stylesheets 'css/src /*' filter='yui_css' %}
101
+ {% stylesheets '@AcmeFooBundle/Resources/public/css /*' filter='yui_css' %}
101
102
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}" />
102
103
{% endstylesheets %}
103
104
104
105
.. code-block :: html+php
105
106
106
107
<?php foreach ($view['assetic']->stylesheets(
107
- array('css/src /*'),
108
+ array('@AcmeFooBundle/Resources/public/css /*'),
108
109
array('yui_css')) as $url): ?>
109
110
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $view->escape($url) ?>" />
110
111
<?php endforeach; ?>
@@ -122,14 +123,14 @@ apply this filter when debug mode is off.
122
123
123
124
.. code-block :: html+jinja
124
125
125
- {% javascripts 'js/src /*' filter='?yui_js' %}
126
+ {% javascripts '@AcmeFooBundle/Resources/public/js /*' filter='?yui_js' %}
126
127
<script src="{{ asset_url }}"></script>
127
128
{% endjavascripts %}
128
129
129
130
.. code-block :: html+php
130
131
131
132
<?php foreach ($view['assetic']->javascripts(
132
- array('js/src /*'),
133
+ array('@AcmeFooBundle/Resources/public/js /*'),
133
134
array('?yui_js')) as $url): ?>
134
135
<script src="<?php echo $view->escape($url) ?>"></script>
135
136
<?php endforeach; ?>
0 commit comments