Javascript load depending on presenter
- coyot_
- Member | 12
I feel dumb. :-) Thank you.
Still, is there any more elegant solution? Previously, I worked with Zend and there was possibility to write it to config file something like this:
scripts.gallery = "js/gallery.js"
But if there is nothing like it, I'm perfectly ok with the suggested way.
- Marek Šneberger
- Member | 130
I'm using in @layout.latte block ‘scripts’ for load default scripts:
@layout.latte:
And for view that need default and extended scripts (eg. Gallery/default)
- coyot_
- Member | 12
Marek: This is quite elegant solution. Thank you very much! :-)
Edit: I found out, you propably have syntax error in your example. It seems, that you can't use e.g.{#scripts}, but {block #scripts}, etc.
My solution (inspired by yours):
@layout.latte
And for view that need default and extended scripts (eg. Gallery/default)
Last edited by coyot_ (2013-11-14 13:05)