Skip Navigation

[Resolved] Slider with fade animation for image field

This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 6 replies, has 2 voices.

Last updated by Jamal 3 years, 4 months ago.

Assisted by: Jamal.

Author
Posts
#2106027

I'm using Toolset Blocks. I want to build a view on a CPT that only displays images that belong to this particular post. The images are added to a custom field. I want to use the view to display these images as a fading slideshow that autoplays.

The images are stored in a regular custom field.

#2106527

Hello again!

I found two Javascript libraries that offer the fade effect and the autoplay feature. They might enforce a specific markup(such as data-* attribute), which are somehow difficult to get using the blocks.
- hidden link
- hidden link

The splidejs library seems to offer more configuration than the slidr library. I'll let you decide which one would suit your needs.

If you are familiar with the legacy views editor, you might want to create a content template specifically to be used as the slider, you will have more control over the HTML markup than inside the blocks editor. Especially, the wpv-for-each shortcode.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-for-each

I hope this helps. Let me know if you have any questions.

#2108525

Hi Jamal

Thanks for suggesting the js libraries.

Q1. Are you suggesting I could add the js to the JS editor in the content template and adapt it to control the image slider block?

I am familiar with the legacy views editor.
Q2. Can I have Blocks and Legacy Views running on the same site?

#2110031

Hello and my apologies for the late reply, but I do not work on Wednesdays and Thursdays as you may check on my profile page https://toolset.com/forums/users/jamal-b/

Q1) Yes, that's what I meant. Instead of copying the JS library's code inside the content template, I'll suggest enqueuing it using PHP, either from the theme or from a CDN.
- https://developer.wordpress.org/reference/functions/wp_enqueue_script/
- https://developer.wordpress.org/reference/functions/wp_enqueue_style/

Q2) Yes, it is possible. You can include a legacy view inside the blocks editor using the View block or using wpv-view shortcode. You can include a content template using the wpv-post-body shortcode.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/

#2112509
ts-views.png
ts-legacy.png

I cannot use TS Blocks and TS Legacy Views on the same site - even though I configured the editing experience settings (see attached screenshot). I still get the following error when I try to activate Legacy Views:

"Toolset Blocks is a different flavour of Toolset Views. You can not use both versions at the same time, so we have deactivated one."

How can I run Legacy Views and Blocks on same site?

#2113057

Ok I think I know what you mean now... I forgot that I can access the "legacy views" interface via admin > Toolset > View > Add new.... so I don't need to install the separate Legacy Views plugin.

#2113439

Exactly. You don't need to install both plugins. Any one of them will provide both editing experiences. And as you have noticed, once you activate one of them, it will deactivate the other.