RozbehSharahi / bootstrap_grids

TYPO3 Extension "bootstrap_grids"
10 stars 38 forks source link

include flexslider as a normal JSFooter File #21

Closed bitbruder closed 7 years ago

bitbruder commented 8 years ago

Lets not include the flexslider file as a Lib. It could lead to conflict with the order of integrated Libs (for example, jQuery as a FooterLib being included AFTER the flexslider file, which could result in a jQuery not defined error). Or would you define the flexslider plugin as a LIB?

laxap commented 8 years ago

Hmm. Well I don't like to change it, it could break existing installations. And I use bootstrap_grids often together with ext:bsdist/bootstrap_core which include bootstrap.js and prettyPhoto.js via includeJSFooterlibs. I would have to change it there too...

Actually I think third-party libs like prettyPhoto, flexslider, bootstrap may be included via includeJSFooterlibs and all custom JS where you might use the libs via includeJSFooter.

Can't you just remove and reassign the prettyPhoto lib after you've included jQuery to fix the order?

page.includeJSFooterlibs.lightbox > page.includeJSFooterlibs.jquery = /path/to/file.js page.includeJSFooterlibs.lightbox = /path/to/file.js

Regards, Pascal

bitbruder commented 7 years ago

Hey, thats alright. I just thought that it was added by accident as a "Lib". I may be the only one who defines only the big guys like jQuery and Bootstrap as a "lib". :) Maybe you should add a constant to either set it as lib or as normal one?