Rotating Photos
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!
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
Another option:
dimsemenov.com/.../
....I can't recommend this slider highly enough! :)
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.
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