Add links in order to allow your vi­si­tors to tweet parts of your text con­tents as shown in the Medium's website comments system.

Simple and easy to play with, choo­se which HTML tag where you want to add all Twi­tter links. CSS ex­ample avai­lable into the plu­gin help for ins­tant set ("Flat Design" style).

Plugin demonstration.
Plugin de­mons­tra­tion appl­ied on diffe­rent paragraph lines (French cour­ses for stu­dents).


Offer to your visitors the ability to Tweet part of any text content on your Textpattern CMS driven websites as in use on "The (New) Guardian".


In repla­cement of the native <txp:body /> tag:

<txp:pat_body_tweets tag="" full="" sign="" tooltip="" class="" content="" />


  • tag String (optional): HTML tags (among: h in sub­se­quent heading levels, p or li) where to add all Twi­tter links. Default: p (all para­graphs).
  • full Boolean (optional): Choose if you want a text appears into your Twi­tter links. Default: 1 (true = yes).
  • sign String (optional): the sign in re­pla­ce­ment of the SVG icon for old brow­ser's back­ward com­pa­ti­bi­lty. Default: +.
  • tooltip String (optional): text for the tool­tip links. Default: none (empty).
  • class String (optional): HTML Class attri­bute for the links con­tainer. Default: notes-marker.
  • content string (optional): Avai­la­ble to in­clude a TXP tag in re­pla­cement of the de­fault body content.

Use (Tweet on mouse selection)

<txp:pat_body_tweets_live id="" account="" label="" popup="" info="" tooltip="" position="" top="" right="" bottom="" color="" style="" />


  • id (string) required. HTML attribute ID of your page template that wrap your main content text where mouse select must to be applied ( i.e.: "wrapper"). Default: wrapper (equal <div id="wrapper">).
  • account (string) required. The Twitter account (without the @ sign) shown in all tweets as a prefix: via @XXX. Default: none (empty).
  • label (string) optional. The text label for the Twitter icon. Default: Tweet it!.
  • popup (boolean) optional. Choose popup or new tab event for the Twitter window. Default: new tab (0 = no).
  • info (boolean) optional. Choose to display a symbol to inform visitors this feature is available. Default: none (0 = no).
  • tooltip (string) optional. The text for the Twitter icon tooltip. Default: "You can Tweet this text on mouse selection".
  • position (boolean) optional. The position of the Twitter icon (see info attribute) from the container (see id attibute). Default: 0 (after the container).
  • top (string) optional. The CSS top position from the container. Default: 0.
  • right (string) optional. The CSS right position from the container. Default: 0.
  • bottom (string) optional. The CSS bottom position from the container. Default: 0.
  • color (string) optional. The background color for the Twitter icon. Default: #00aced.
  • style (string) optional. Allow you to add custom CSS rules (applied to the Twitter icon). Default: none (empty).

Get it for free (v. 0.3.4)

Just ins­tall this plugin as al­ways:


Or return to the main "pat-plugins" page