Hi,
when for example you want to add jQuery library in your project you
will include it in all pages.
in the layout:
$view->javascripts->add("js/jquery-1.4.2.min.js");
and just after :
$view->javascripts->output();
now to include a plugin for a speciffic view,
i don't want to include the plugin in all my pages just in view who
use it.
so i put my code in the view :
$view->javascripts->add("js/jQueryPlugin.js");
and when i render the page i have this:
<script type="text/javascript" src="/ljs/jQueryPlugin.js"></script>
<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
there's an error because the file "jQueryPlugin" is include before the
"jquery-1.4.2.min.js" file
this would be great if we can specify an order to a specific file to
be sure she cames first, the same for stylesheets who are cascading in
general.
for the moment i make this change in javascriptsHelper line 72-73
$js = array_reverse($this->javascripts);
foreach ($js as $path => $attributes) {
with the array_reverse all files added first came last,
of course there's a better solution, but i haven't found it
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en