Jump to content

Display Twitter feeds inside CMS pages


Fred Fournier

Recommended Posts

Hello,

 

I would like to ask if there's a way that allows to publish tweets inside a CMS page like happens with Facebook posts (which are published through iframes keeping the chance to interact with them).

 

I know that the embedding code from Twitter is way different than Facebook's and includes also Js, which my text editor should support, but it seems it's completely ignored by Prestashop. Inside the text editor (Back-office) strings with text and links can be seen but when I save then preview nothing appears in Front-office.

 

Thanks for any help.

Link to comment
Share on other sites

CMS pages out of the box don't allow for javascript. I'm pretty sure there is a way to change that but I find CMS pages too restrictive so what I've started to do is just build normal webpages and then embed them in a CMS page -- this allows for everything including javascript.

I don't know if there is any negative consequences of doing it this way but CMS is just too limited so I don't see an alternative if you want more advanced pages.

  • Like 1
Link to comment
Share on other sites

CMS pages out of the box don't allow for javascript. I'm pretty sure there is a way to change that but I find CMS pages too restrictive so what I've started to do is just build normal webpages and then embed them in a CMS page -- this allows for everything including javascript.

 

I don't know if there is any negative consequences of doing it this way but CMS is just too limited so I don't see an alternative if you want more advanced pages.

 

Thank you very much for your reply. So not even a module allows that?

 

I tried your solution (embedding a standard webpage html code inside CMS), but I can't make it work (js is ignored again). Are you using particular tricks to do that?

 

Thanks again

Link to comment
Share on other sites

This is all I have the the CMS page

<iframe width="100%" height="2500" scrolling="no" src="http:// url goes here"></iframe>

The other thing I did was add the full TinyMCE which you probably need to do if you want to not have the the editor strip out the javascript

 

Here is a tutorial on that https://mypresta.eu/en/art/know-how/tinymce-editor-full-options-all-html-tags.html

 

I believe there is also a module available that you can buy but I just made the edits and it worked fine -- although it did conflict with a different module so I had to go off script a little but without the module conflict this tutorial is pretty easy to follow

Also when doing in this way you have to insert some JavaScript into all your embedded pages to ensure that they don't load on their own -- somehow get indexed and then show up as direct links rather than in the iframe. That is easy to go and if you Google you'll find a bunch of tutorials but if you have problems I can post the code for that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...