Rotating Photos

Posted by Community Admin on 04-Aug-2018 23:38

Rotating Photos

All Replies

Posted by Community Admin on 02-Oct-2013 00:00

Hello,

There is a requirement for the site we are working on to have a rotating photo control. Photos are being added to the gallery and are being assigned to various categories. Then an image is being added to a page and based on a category, is being shown on that page. 

The idea is to have this be random. So if there are 10 photos in one category, and an image gallery is on a page pulling photos from that category, it would show 1 random photo out of those 10. I know it wont be purely random but you get the idea.

What would be the best way to approach this? I could build a new widget but then would have to build the category selector tool along with other basic features of an image gallery.. or if possible, is there a way to modify the image gallery itself to handle such a requirement?

Thanks!

Posted by Community Admin on 03-Oct-2013 00:00

Alain, have you looked at using jQuery Cycle 2?  I'm using it for my company's banner rotator.  Aside from some C# I had to write to grab the images from the media library, jQuery cycle did the rest.  It's declarative, too, so don't have to worry about writing a lot of complicated javascript;  you just bind the cycle event to the banner's container and set attributes in it.  The script takes care of the rest.  

I hope this is even remotely helpful to you. 

jQuery Cycle page:
jquery.malsup.com/.../

Matt

Posted by Community Admin on 03-Oct-2013 00:00

Another option:
dimsemenov.com/.../

....I can't recommend this slider highly enough! :)

Posted by Community Admin on 03-Oct-2013 00:00

Thanks everyone! Great ideas but I think I mis-titled this post. Instead of Rotating Photos I should have called it Random Photos. My intent here is to serve up 1 photo on the page at a time, not in a carousel. The client wants one random photo from a category of photos every time the page loads/refresh. 

Posted by Community Admin on 13-Oct-2013 00:00

Hello Alain,

You desired scenario cannot be achieved with the out of the box functionality which Sitefinity provides and because of this you have to implement your custom solution. Please check the following forum thread where you can find some information about similar scenario.

Random Image on Load server control

Regards,
Kaloyan
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed