How to Add a Retweet Button to Movable Type

by Liberation on October 17, 2009

How to add a retweet buttonI added TweetMeme’s Retweet function to a Movable Type blog today. Their website offers some guidance as far as adding it to websites, WordPress, TypePad, etc., but once again their is no example specifically for Movable Type. Of course the first thing that came to my mind was an article I read yesterday called What’s Happening to Movable Type which suggests MT’s downfall could be the lack of community and people willing to share what they learn. Ya think?

With some minor tweaking I got the Retweet working relatively fast. To save you some time, here’s my two minute tutorial for adding a Retweet button to your Movable Type blog.

  1. Insert the code below into your Entry Summary template (right after your existing <div id=”entry-<$mt:EntryID$>” class=”entry-asset asset hentry”> code) and your Entry Detail template (right after your existing<div class=”asset-header”> code.)
      <div style=”float: right; margin-right: 5px; margin-top: 7px;”>
      <script type=”text/javascript”>
      tweetmeme_url = ‘<$MTEntryPermalink$>’;
      tweetmeme_style = ‘compact’;
      tweetmeme_source = ‘enter your Twitter username here’;
      </script>
      <script type=”text/javascript” src=”http://tweetmeme.com/i/scripts/button.js”></script>
      </div>
  2. Replace the words enter your Twitter username here with your Twitter username.
  3. Save your templates and publish!

What I did was use the code shown on their How to Add a TweetMeme Button to Your TypePad Blog and tweaked the margins. I am using the compact style but if you want the larger Retweet icon, you can change the style from compact to normal.

If you find this post useful, feel free to… Retweet!

Note: If you are using MT 5 Beta there isn’t a Entry Detail template anymore. Add the code to the Entry template immediately after <div class=”asset-header”>.

Related Posts

Leave a Comment

Previous post:

Next post: