iFrame working only in Edit mode
Permalink 1 user found helpful
Hi Everyone!
I'm having difficulties installing an external script. I tried with iFrame and it works fine in edit mode but as soon as I sign out from edit mode the script doesn't show up, there is nothing to see. Has anyone had this kind of a problem?
Can someone please explain what's the best way of adding external scripts into C5 CMS?
Thanks in advance
Regards,
Ermin
I'm having difficulties installing an external script. I tried with iFrame and it works fine in edit mode but as soon as I sign out from edit mode the script doesn't show up, there is nothing to see. Has anyone had this kind of a problem?
Can someone please explain what's the best way of adding external scripts into C5 CMS?
Thanks in advance
Regards,
Ermin
Having the same issue here as well.
The same issue here with downloaded iframe block and also dynamic iframe block. In edit mode I see the iframe, but not in view mode. Also I checked the view source in view mode and no reference to an iframe tag.
I had this same issue, but then I discovered that Concrete5 wasn't resolving the URL properly in every case. This is what was causing my issue. I've listed a method for using iframes within C5.
Concrete5 has a variable called CCM:BASE_URL. This is good for manually correcting issues where C5 does not automatically resolve the URL. Insert the base url variable infront of the path to your URL. A height and width must also be defined. C5 automatically assigns a height of 240 and width of 320. But you can override this in your stylesheet. Use an id to style your iframe and hide the overflow. Lastly, this works best using a Content block instead of an HTML block.
Example:
<iframe id="" style="overflow: hidden;" src="{CCM:BASE_URL}/directory/filename.php" frameborder="0" scrolling="no" width="320" height="240"></iframe>
Concrete5 has a variable called CCM:BASE_URL. This is good for manually correcting issues where C5 does not automatically resolve the URL. Insert the base url variable infront of the path to your URL. A height and width must also be defined. C5 automatically assigns a height of 240 and width of 320. But you can override this in your stylesheet. Use an id to style your iframe and hide the overflow. Lastly, this works best using a Content block instead of an HTML block.
Example:
<iframe id="" style="overflow: hidden;" src="{CCM:BASE_URL}/directory/filename.php" frameborder="0" scrolling="no" width="320" height="240"></iframe>
Curious to know if anyone has had this problem and been able to resolve it.