+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Rotating Photos

Rotating Photos

5 posts, 0 answered
  1. Alain
    Alain avatar
    3 posts
    Registered:
    13 Aug 2013
    02 Oct 2013
    Link to this post
    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!
  2. Matt
    Matt avatar
    4 posts
    Registered:
    05 Sep 2013
    03 Oct 2013 in reply to Alain
    Link to this post
    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:
    http://jquery.malsup.com/cycle2/

    Matt
  3. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    03 Oct 2013 in reply to Matt
    Link to this post
    Another option:
    http://dimsemenov.com/plugins/royal-slider/

    ....I can't recommend this slider highly enough! :)
  4. Alain
    Alain avatar
    3 posts
    Registered:
    13 Aug 2013
    03 Oct 2013
    Link to this post
    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. 
  5. Kaloyan
    Kaloyan avatar
    272 posts
    Registered:
    05 Dec 2016
    13 Oct 2013
    Link to this post
    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
5 posts, 0 answered