Modern Sliders - Standard Testimonial Carousel

Hi,

Firstly, you guys have done amazingly with the new Modern Sliders presets - incredible!

I have a question about the Standard Testimonial Carousel, which I am not sure if it is possible. I your example, you are using JSON data. Is it at all possible to somehow use the Pro Testimonials or Rating element rather than JSON data. The reason for asking is that the Pro elements allow schema, whereas the JSON method, presumably, does not?

Clearly JSON is feeding the required data through to the slides, so I am not sure if my question is possible!

Secondly, looking at the JSON data, the reference to the image in each slide is a huge long line of seemingly random letters (see screenshot). Can a standard media library URL be used and if so, how?

Many thanks,
Christopher

Hi @whitemedia,

Glad to hear you’re enjoying Modern Sliders! It’s definitely possible to use a Rating element in the Slides and pull from the JSON data.

  • In the JSON, add "stars": "5" (or whatever number you like) to each testimonial object. JSON is very strict, so be careful that every line in the object except the last ends in a comma.
  • Add Rating into the Slide somewhere
  • Set “Rating” to {{dc:looper:field key="stars"}}
  • If you want to go above and beyond, you can add an Element Condition to the Rating element and check if the content of {{dc:looper:field key="stars"}} is not empty. That will hide the element on testimonials that don’t provide a Rating

Now for the images. data:image/**** is a special type of URL. The browser interprets it as an inline image and doesn’t have to fetch anything like it would with https. We did this one some assets so when they are imported, you don’t get a bunch of images in your library that you don’t need.

There are two other things you can do.

  1. Change it to "image": "https://example.com/link-to-image.png" and you can link directly to any image you want.
  2. Change it to "image": "1234:full" where 1234 is the ID of the media library item you want to reference, and it will resolve the Image URL for you. The full bit means it will use the full image rather than a thumbnail size.

Our goal longterm is to offer a way to create bespoke types of data in a way that can be updated visually, but for now JSON is the best way for us to establish a consistent structure and centralize the data in one place for editing.

1 Like

Hi @alexander,

Thank you for such a clear explanation! I think the Modern Slider is a game changer in many ways - I just need to get my head around JSON a bit more (not a specialism!).

I have tested your suggestions and all works perfectly, thank you.

One request I have is in regards of the Testimonial Carousel; would it be possible for a fuller tutorial in Modern Sliders videos or documentation, for adding in full schema output, similar to how the Testimonials Element does in Pro - to avoid Google Search Console errors? This may be one for @kory?!

Any which way, the sliders are fantastic and thank you all.

Thanks,
Christopher

You are most welcome, Christopher!
I will forward your feedback to Kory.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

@whitemedia, thank you for the kind words! As for right now, there are no plans to change anything with regards to schema, so using that Rating Element might be the best thing as a native solution. Down the road we’d like to look into a more generic inline schema solution if possible, but with the Theme Options reboot around the corner in addition to some other items, that won’t be a primary focus for some time, so anything beyond that would need to be implemented on your own. As we develop out more ways to introduce Schema markup into your designs, I’ll certainly keep that in mind with any potential future tutorials we do.

Cheers!