Plugin Support
Gabor
(@nextendweb_gabor)
Hi @adriangzz98!
I’m sorry, but I don’t think there will be a solution for this. Iframes are like opening a website’s page on a completely separate window. They don’t have a connection to the outside, so any codes happening are only happening within the iframe. As you are inserting a slider inside a small iframe, that is all the place it can have its codes, and the lightbox cannot be pushed outside of it.
Would you recommend a different approach on how to archive this?
Plugin Support
Gabor
(@nextendweb_gabor)
There isn’t really a good solution, because our slider wasn’t designed for this usecase. The problem is, that you need ajax, unless if you would publish all your sliders into the page already. That way you could just show/hide the different sliders instead of calling them in into an iframe. Just this isn’t very optimized, as you will have all images and html codes on the page, even if they aren’t used.
Another option would be, that since you aren’t able to display bigger images on the current page, rather link to another one. Instead of using lightboxes to show the images, you would for example create a new slider for each of your current iframed sliders and publish them into pages. When a user clicks on the iframed slider, that new page will open up for him to see the images.
The reason Im using ajax its cause my main plugin uses it. So when I put the shortcode in the description it will not load since the shortcode wasnt there when the page load. So is there a way to reload the plugin to search for shortcodes again?
Plugin Support
Gabor
(@nextendweb_gabor)
With ajax you cannot call in shortcodes properly (officially we don’t even support ajax calling in our slider due to this), so that part is correct, that with ajax the only way of calling in shortcodes is to call them in within iframes. Because calling in an iframe is like opening a webpage as originally it would happen. Just this creates your entire issue, and I’m sorry, but there really isn’t a solution for your problem. It is just completely not possible to use our plugin the way you would need it.
Thank you for your response,
One last idea I have, could it be possible to add the whole html in the description and then append the script some where?
Plugin Support
Laszlo
(@laszloszalvak)
Hi @adriangzz98
Unfortunately that can not work either, since some of our scripts have a purpose on load as well, and by loading our JavaScript codes later, you would still have the same problem that you currently have. If you try to call in the slider directly into the document via AJAX, then we can not guarantee that your sliders would appear fine.
When your content is loaded with AJAX, then only way your slider can work is using an iframe like my colleague mentioned, as we don’t support AJAX incalling: