Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Allan Hawkey 232 posts 303 karma points
    Sep 28, 2011 @ 14:01
    Allan Hawkey
    0

    More than one mtt rotatePro gallery on a page

    Is it possible to add more than one gallery per page.  I've tried it - it works fine with just one, but when I add a second or subsequent gallery, only the first one on the page rotates.  The others are just stuck on the first image.

    I'm using umbraco 4.7 with mtt_rotatePro 1.0.

    Thanks
    Allan

  • bob baty-barr 1180 posts 1294 karma points MVP
    Sep 28, 2011 @ 15:44
    bob baty-barr
    0

    Allan, you have to update the jquery call to initiate the cycling on additional rotators... also, i am not sure that the code allows for multiples because the containing divs IDS would be the same.

    if you are comfortable with xslt, you could update it to make the DIV ids contain a node id as well so you could have multiple on the same page.

    does that make sense?

  • Allan Hawkey 232 posts 303 karma points
    Sep 28, 2011 @ 16:46
    Allan Hawkey
    0

    Hi Bob

    Thanks for your suggestions.  I tried a simple version of the div idea, by changing one of the ids to rotatorMain1 for now (I can insert the node ID later if this works).  I also added that style to the mtt_rotatePro stylesheet.

    End result - some progress, but not a complete fix yet.  Now both rotators rotate (great!), but the first one loads and displays all items, and then rotates them all at each rotation, if that makes sense?

    So then I looked at the mtt_rotatePro.js file - I can change$('#rotatorMain').cycle({ to$('#rotatorMain1').cycle({

    That gets the first rotator working correctly again and the second one goes wrong (same issue - they all load at once etc).

    So that leaves me with the question of how to get the js file to identify dynamically each div on the page - any thoughts on that?

    Thanks
    Allan

  • bob baty-barr 1180 posts 1294 karma points MVP
    Sep 28, 2011 @ 17:17
    bob baty-barr
    0

    oh, boy... i just looked at the project for the first time in a long time...

    i am not reallly sure if i ever anticipated multiples being used on a page.

    the challenges revolve aound the linkages between the rotator and the carousel.

    basically, there would need to be a bit of a refactor to allow you to specify a unique identifier as a document and/or macro property, then re-write the javascript, xslt, etc.

    sorry that isn't really a great answer... but it's all i got :(

  • Allan Hawkey 232 posts 303 karma points
    Sep 29, 2011 @ 10:32
    Allan Hawkey
    0

    I've created a not-very-sophisticated workaround which seems to solve the immediate issue - I have 2 areas of the page where we might want a rotator: the header section and the main body.

    So I've taken a copy of mtt_rotatePro.js and called it mtt_rotatePro1.js and renamed the div in the header section to rotatorMain1 and linked those two together.  That seems to do the trick.

    Of course, it won't help the situation where clients want multiple rotators in the body of the page - I have a client who would like that too - as I still can't create / call the id's dynamically.  But at least I'm over the immediate issue!

    Thanks for your help with this - and do keep me posted if you add this feature to the package in future.

    Many thanks
    Allan

Please Sign in or register to post replies

Write your reply to:

Draft