This project is read-only.

ShareThis control properties and their behaviours

The ShareThis control is a simple beast with few rules.
Because of the way the ShareThis service is written, some of the properties in the control are global to a page, while some are instance-specific.
Here's a list of each and it's behaviour (along with the appropriate ShareThis variable, if you're coming from using their own proprietary integration methods).

  • Per-instance settings
    • Text (displayText) - sets the display text of the control. Pretty simple.

      <sc:ShareThis [...] runat="server">Your text here</sc:ShareThis> and <sc:ShareThis [...] runat="server" Text="Your text here" /> will both produce the same output.

      You cannot include other controls inside the tag though - it's limited to plain-text only, sorry.

    • Title (st_title) - sets the title that gets shared. Defaults to the page's actual title if left blank.
    • Url (st_url) - sets the URL that gets shared (in case you need to add or modify querystring parameters, location hashes from SWFAddress, etc.). Defaults to whatever's in the browserbar.
  • Global settings
    The popup widget is only placed once inside a page (it's an iframe), and these settings are applied to it via the ShareThis Javascript API (stLight.options()).
    • Publisher (publisher) - a ShareThis access key. Required.
    • HeaderBackground and HeaderForeground (headerBg and headerFg) - lets you specify the header background and foreground colours for the popup widget.
      Expressed as a hex string ("#000000") or as a CSS colour ("black"). Defaults grey (#CCCCCC) and white (#FFFFFF) respectively.
    • Hover (onhover) - lets you specify whether the widget appears on mouseover, or requires clicking the control.
      Boolean (true or false only), default true.
    • AutoClose (autoclose) - lets you specify whether the widget automatically closes on mouseout, or requires clicking either the "x" on the widget, or elsewhere on the page, to close it.
      Boolean (true or false only), default true.
    • AutoPosition (autoposition) - lets you specify whether the widget is automatically positioned in the window, close to the widget, or positioned manually.
      Enumerable True, False, or Center, default True.
    • Embeds (embeds) - lets you specify whether embedded page objects (e.g. Flash) are hidden when the widget is displayed.
      Boolean (true or false only), default false.

Last edited Feb 10, 2011 at 6:32 PM by codegecko, version 3


No comments yet.