The problem
We want to use a revolution slider with different background-images on each slide depending on a variable in a Single Page Application. If the slide variable changes the image path changes but the div where the background-image is set doesn’t update the background-image.
Also we would like the assets folder structure of the exported slider automatically to be for example assets/images/component/XXX. Ideally the images are stored in the XXX folder and image src in the slider.html files points to assets/images/component/XXX folder.
What we tried
We tried to bind the image src path to our variable. When the application starts (on first load) the image (and url) are replaced by a div where the background-image is set with the path we provided. When we update the variable, the div with background-image doesn’t update with the new url.
For the folder structure we tried to use the “replace URL” function in “Import / Export / Replace” section of the Slider settings but the image paths were still pointing to assets/{image-name}. If we fill in assets/images/component... in external url box of the background image then in the exported html the img src will be the one we provided. But this is only for background images and not for other images.
Revolution slider with variable background images and custom folder structure
1 reply · opened Apr 3, 2020
Hello,
We really apologize about the misunderstanding, however, we did not understand the issue you are facing with the Revolution Sliders completely. Are you trying to change the Background Image dynamically using PHP (or an equivalent preprocessor) or by JS? If, you are doing so using PHP, everything should work fine, however, if you are trying to do so using JS, there might be issue as the Revolution Slider's JS Codes might be conflicting with your JS Codes. Unfortunately, a Template or Functionality related to this is currently not included with Canvas. The Revolution Slider Templates are provided only for Templating Purposes and any further customization or feature/functionality enhancements is your responsibility as we currently do not provide Customization related Support according to the Item Support Policy: https://themeforest.net/page/item_support_policy .
The Export Functionality is the default functionality of the stock Revolution Slider Visual Editor and there are we have no codes which modifies the functionality. This is something which has to be fixed directly by the Plugin Authors. We will release an update as soon as the Visual Editor Plugin is updated to fix this issue.
Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard