Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Angela 1 post 21 karma points
    Dec 01, 2009 @ 23:03
    Angela
    0

    Twitter Feed

    Our site currently uses Umbraco CMS. Each time I try to add the javascript for a twitter feed to the HTML of a page, Umbraco removes it.

    How can I do this?

    Thanks!

  • Peter Gregory 408 posts 1614 karma points MVP 3x admin c-trib
    Dec 01, 2009 @ 23:11
    Peter Gregory
    0

    Are you trying to add the JS in the RTE?  If you are the tinymceconfig.config has a validelements section in it that specifies what elements are allowed.  Script is not in there by default.

    I would suggest that you put your code into a macro and enable the macro to be added to the Rich text editor. This way you will be able to insert it without needing to worry about modifying any config files.

    Peter

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Dec 02, 2009 @ 15:12
    Morten Christensen
    0

    Have you had a look at the Twitter package for Umbraco?

    http://our.umbraco.org/projects/twitter-for-umbraco

    I'm not entiry sure what and how you are trying, but it sounds like the Twitter package might be useful ? But I'm sure you have to add the JS in the header of your page (probably your main masterpage).

    - Morten

  • Stephen Davidson 216 posts 392 karma points
    Nov 22, 2012 @ 17:58
    Stephen Davidson
    0

    I'm having a similar issue but I had already thought to wrap my code up in a macro.  I've created a widget on twitter and the code looks like the following:

     

    <a class="twitter-timeline" href="https://twitter.com/CloudwiseSE" data-widget-id="271651085133942785">Tweets by @XXXXXXXXXX</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

    I've then created a HTML script in Umbraco and pasted the code in, from here i then created the macro.  When i insert the macro either in my page or into the content editor the twitter widget does not show at all, even when vewing source. There are no errors on the page either.

    I'm running an MVC site with Umbraco 4.10.1.  

    TIA

    S

     

Please Sign in or register to post replies

Write your reply to:

Draft