• Resolved cwulff

    (@cwulff)


    Hi there,

    I’m wondering if you might have an idea as to how to change the paging icons over to thumbnails of the slides they refer to. Probably not a simple matter, but something a group I’m volunteering with really wants to implement and, having looked at the plugin, I’m not sure where exactly to start.

    Many thanks,
    Christopher

Viewing 4 replies - 16 through 19 (of 19 total)
  • And of course I forgot that css class cannot start with numbers…not unless you put it into UTF-8 code, go here:

    https://rishida.net/tools/conversion/

    type in the number you want and copy the UTF-8 code value then add a slash in front of it so that a css class of “1” would become:

    a.\1 (there must be a space after 1)

    Plugin Author Josh Leuze

    (@jleuze)

    Hi Kayla, thanks for trying Meteor Slides!

    There are a couple of ways to approach this issue. If you need actual unique content in the pager buttons, like a thumbnail of the slide or the slide title, I would say to create a custom slideshow template with a second loop. With this you could have far more control over the markup and make sure each button has its own class to make styling them easier.

    But it sounds like you just need the unique classes and the content of the pager links can still just be numbers, so that would be overkill.

    I think you are doing it correctly for this situation by just tweaking the output of the pager links that are already being generated. But I wouldn’t edit the cycle script if you can avoid it, it will make updates difficult and there are a lot of moving parts so it is easy to break!

    I would instead do this in the slideshow.js script so that your hack is easier to re-apply and less likely to break anything. Here you can see an example of this in the Cycle site, though it is a bit more complex than you need: https://jquery.malsup.com/cycle/pager2.html

    This is the code I would use to do that:

    pagerAnchorBuilder: function(idx, slide) {
    			return '<a href="#" class="mbutton mbutton-' + ( idx + 1 ) + '">' + ( idx + 1 ) + '</a>';
    		}

    With that code, it is still simply using numbers for the links, but they are also added as classes so that each has a unique class so that they end up looking like this:

    <a href="#" class="mbutton mbutton-1">1</a>

    The classes use the same convention as the slide classes where they each have a generic class they share and then a specific numbered version. This is more semantic and will avoid the problem of classes that start with numbers.

    By the way, the next version of Meteor Slides will support custom slideshow scripts, so if you drop a copy of slideshow.js into your theme when you are done editing it, it will switch to that copy when you update the plugin and won’t break your hack.

    Thank you so much for the detailed post and timely help Josh! I really appreciate it!

    Plugin Author Josh Leuze

    (@jleuze)

    No problem Kayla!

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘[Plugin: Meteor Slides] Feature request – Replace paging with smaller thumbnails’ is closed to new replies.