FancyBox

Posted by Community Admin on 03-Aug-2018 16:39

FancyBox

All Replies

Posted by Community Admin on 15-Apr-2011 00:00

Hi there.

I am now really at the end of my tether.
The more I use SiteFinity, the more I wish I hadn't bothered.
Every time I come to do something simple, it ends up being a huge task. I have now just spent 5 hours creating a gallery that should just work.

The gallery that comes with SiteFinity is just unusable. I have been told that I can not change the thumbnail widths, which makes it totally useless for my site.
So I created my own simple gallery using FancyBox and some jQuery.
You can see it here:
brightdigital.co.uk/newtest.aspx

So, once, I had that working, I decided to add it to SiteFinity. Should be fairly simple I thought. Boy was I wrong.
Adding this to the site caused it to stop working. I knew that SiteFinity used FancyBox, but no matter what I try, I can not get it to work with my gallery. I have tried alsorts.
I figure that SiteFinity must be using an older version.

Can someone please tell me what I need to do to get it to work.

Here is the link to the page that is not working.
brightdigital.co.uk/imagetest

I will be posting another thread about the blog archive control (which is even more useless that the gallery) in a minute..... as no one has replied to my ticket.....
I am so close to looking for another product. Although SiteFinity looks good, only simple things seem to work. As soon as I need to add anything, it breaks.
This is not good.

Posted by Community Admin on 15-Apr-2011 00:00

You need to move the fancybox script reference to the botttom of the body tag. You can do this in a master page or you can add it using the script/style widget and set it to end of the body tag.

The reason it is not working is that Sitefinity will add jquery to the site. It is added toward the top of the body tag and your reference to fancybox is above this. So the jquery instance that is provided by Sitefinity is basically causing the fancybox initialization to be erased. There are a few posts on the forum which talk about this. I have just started to put my references to any plugin at the bottom of the body tag.

Posted by Community Admin on 18-Apr-2011 00:00

You sir, are my new hero :)

Thanks a lot.

Posted by Community Admin on 22-Nov-2013 00:00

Speaking of unusable and totally useless - does anyone know if Sitefinity allows you to modify the rendering of the Fancybox modal dialog resulting when you click image gallery thumbnails? Out of the box, the markup seems untested because the image description field blows out to 100% width of the entire screen, even if the image is 800px centered in the modal layer.

Or is this markup decompiled into 0s and 1s within the Sitefinity project? Sorry, not a compiled language developer here, I'm a designer for the web and it drives me batty that this one small piece of the presentation layer is inaccessible except via some compiled language IDE.

Posted by Community Admin on 24-Nov-2013 00:00

Hey Luke,

Yes, they load the styles from the embedded .css file Telerik.Sitefinity.Resources.Themes.Basic.Styles.fancybox.css

Easiest route to go is to simply add to the page:

$(".sfLightBox").fancybox(
  'titlePosition' : 'inside'
);

And from there style accordingly. Trying to get the default 'outside' title to flow nicely with auto widths according to images sizes is euhm 'tricky' :)

Jochem

This thread is closed