Fancybox Gallery & Page List

Permalink Browser Info Environment
Hi!

If I have a page list that fetches the first part of a blog post, and the blog post contains a Sortable Fancybox gallery, the required fancybox javascript files doesn't get loaded automatically.

Is there an easy way to make them load automatically or should I hardcode the fancybox js & css into the theme (so it gets loaded on every page)?

If you recommend the latter, how do I disable the double loading (because then the files are loaded twice - by the theme, and on certain pages also by the add-on.)

Thanks in advance!

Type: Discussion
Status: New
gd42
View Replies: View Best Answer
jordanlev replied on at Permalink Best Answer Reply
jordanlev
The easiest thing to do is include the fancybox js (and css) in your theme header, then disable it in the addon itself, by changing this code in packages/sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/controller.php (should be around line #15):
if ($this->enableLightbox) {

...to this:
if (false) { //disable fancybox here because we're including it in the theme header


-Jordan

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.