Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

2 modules of type Sp Smart Slider don't work on same template.

Featured Lock Resolved Bug
I am using 2 instances of Sp Smart Slider on a the stat page of a newsplus template.

For an unknown reason i cannot set particular articles on each instance as it appears that the seconds instance is bound to the first.

The issue is present only if both instances are published

I am using the nivo theme.

Please suggest a solution

I have a test site ready for inspection if required

4 Answers

Igor Mihaljko

More than a month ago #Permalink
I am afraid that SP Smart Slider is built in a way that it can work only with s single module instance on one page. You can't have multiple copies of the module on a single page

Igor Mihaljko

More than a month ago #Permalink
Contribution from one of our member

-----------------------------------------------------------------------------------------------------------------------

In the template of the slider, there is a file with the JavaScript for the slider setup.

In the sample of Dimitris Sampson the nivoslider is used, so the file would be under:
modules\mod_sp_smart_slider\tmpl\nive_slider\jquery.nivo.slider.js
You might need to recreate the packed JS file if you are using that one.

So to be able to use two sliders I duplicated the theme and I am using a module class suffix in Joomla to identify the slider.

In the JS file (about line 624) there is the following code:

$.fn.nivoSlider = function(options) {
return this.each(function(key, value){
// more code ...
}


For my two templates, I changed it in the relevant file to e.g.:

// for the first template in tmpl\nivo_slider\jquery.nivo.slider.js
return $(".teaser-slider .nivoSlider").each(function(key, value){ ... }
// and for the second template in tmpl\nivo_slider_content\jquery.nivo.slider.js
return $(".content-slider .nivoSlider").each(function(key, value){ ... }


There are still a few drawbacks because I didn't look up the rest of the code and changed nothing else, but it is at least working for me.

Recognized drawbacks so far
Lost ability to set setting separately i.e. direction navigation or control navigation are set 'global' for both sliders

Maybe this workaround helps until things can be improved in a new build.

-----------------------------------------------------------------------------------------------------------------------

Dimitris Sampson

More than a month ago #Permalink
Igor Mihaljko wrote:

Contribution from one of our member

-----------------------------------------------------------------------------------------------------------------------

In the template of the slider, there is a file with the JavaScript for the slider setup.

In the sample of Dimitris Sampson the nivoslider is used, so the file would be under:
modules\mod_sp_smart_slider\tmpl\nive_slider\jquery.nivo.slider.js
You might need to recreate the packed JS file if you are using that one.

So to be able to use two sliders I duplicated the theme and I am using a module class suffix in Joomla to identify the slider.

In the JS file (about line 624) there is the following code:

$.fn.nivoSlider = function(options) {
return this.each(function(key, value){
// more code ...
}


For my two templates, I changed it in the relevant file to e.g.:

// for the first template in tmpl\nivo_slider\jquery.nivo.slider.js
return $(".teaser-slider .nivoSlider").each(function(key, value){ ... }
// and for the second template in tmpl\nivo_slider_content\jquery.nivo.slider.js
return $(".content-slider .nivoSlider").each(function(key, value){ ... }


There are still a few drawbacks because I didn't look up the rest of the code and changed nothing else, but it is at least working for me.

Recognized drawbacks so far
Lost ability to set setting separately i.e. direction navigation or control navigation are set 'global' for both sliders

Maybe this workaround helps until things can be improved in a new build.

-----------------------------------------------------------------------------------------------------------------------


Thank you for the effort. I had to offer a permanent solution so I resorted to using a modified (by me) version of the BT Content Slider module. After some css modifications it is as good or even better that the equivalent Joomshaper module. I infact used both in the site in question.


There are no replies made for this post yet.
Be one of the first to reply to this post!

Leaderboard (30 days)

Paul Frankowski

Paul Frankowski

Total Accepted Answers: 107
Toufiq

Toufiq

Total Accepted Answers: 61
Sifat

Sifat

Total Accepted Answers: 45
Mehtaz Afsana Borsha

Mehtaz Afsana Borsha

Total Accepted Answers: 18
Ofi Khan

Ofi Khan

Total Accepted Answers: 18

118

Templates

306022

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us