DV-JF Posted January 16, 2013 Share Posted January 16, 2013 Hey, I want to implement a lightbox to my front-end pictures. Now I'm asking me, what would be the best practice to do this: Can I use the module "jQuery Fancybox Plugin" or do I have to use an extra *.js file? Greets Jens alias DV-JF. Link to comment Share on other sites More sharing options...
Joss Posted January 16, 2013 Share Posted January 16, 2013 Hi There! Interesting enough, I completely missed the module when I was doing a demo site the other day and just downloaded Fancybox (and a couple of others I needed). You might as well use the module (since it is there), but any JavaScript or specific JQuery you want to use is as easy as just following the instructions on the suppliers website. Which means you are completely free to use anything you want. One note (which you may have already worked out) - the JQuery in the site/templates/scripts directory only effects the front end - so you can update it (if it is out of date) to whatever you want. Or go for a different system instead, of course. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 16, 2013 Share Posted January 16, 2013 call: $modules->get("JqueryFancybox"); from whitin your template Then the CSS & the JS will be in the script & css array. use them in your <head> foreach($config->styles->unique() as $file) echo "<link rel='stylesheet' href='$file' />"; foreach($config->scripts->unique() as $file) echo "<script src='$file'></script>"; 2 Link to comment Share on other sites More sharing options...
Pete Posted January 16, 2013 Share Posted January 16, 2013 The one thing to bear in mind with using the version from the admin is something ryan mentioned ages ago in another thread - it might be better to use your own download in case the admin version ever changes. For example the current version is FancyBox v1 and there is a v2 version of Fancybox - whilst I can't imagine ryan changing it yet as the current version works fine, it could break your front-end work if it were to change. It's one of those things that probably won't happen or if it does it might not affect you, but still worth bearing in mind. 2 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 16, 2013 Share Posted January 16, 2013 And if you want to know the options, goto 1.2+ on the fancybox website. ( old options ) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now