Modular Merchant
QuickCode™ Glossary
QuickCode Tag Glossary Home
See also:
Knowledge Base
Articles in this category:


































































{TWITTER-TWEET-BUTTON} Updated: 02/11/2013

This QuickCode Tag is used to add a Twitter "Tweet" button to any page of your online store.

The tag can be used as-is to display a Twitter Tweetbutton in your storefront. However, it can also accept several parameters, which can be used to customize its appearance and behavior. The available parameters include:

URL of the page to share.
Possible values: Any URL
Default: Webpage containing the button

Screen name of the user to attribute the Tweet to.
Possible values: Any Twitter screen name
Default: User's Twitter screen name

Default Tweet text.
Possible values: Any text, with spaces replaced by hyphens. The hyphens will be changed back to spaces when the Tweet text is rendered in the web browser.
(See the "No Spaces in QuickCode Tag Parameters" instructions below for more details.)
Default: Content of the page's <title> tag

Related Twitter accounts. Using the related field you can suggest accounts for a user to follow once they have sent a Tweet using your Tweet Button. These suggested accounts and their basic information are shown on the last page of the Share Box flow.
Possible values: Any Twitter screen name
Default: none

Determines whether or not the count box is displayed, and where.
Possible values: none, horizontal, vertical
Default: horizontal

The language applied to the Tweet button.
Possible values: en (English), fr (French), de (German), it (Italian), es (Spanish), ko (Korean), ja (Japanese)
Default: en

URL to which your shared URL resolves.
Possible values: Any URL
Default: none

This will create a Tweet button that specifies a hashtag within the text and the button.
Possible values: Any text (exclude the "#" character)
Default: none

The size of the button can be set to either "medium", which is the default size, or "large", which is a larger version.
Possible values: medium, large
Default: medium

Twitter buttons on your site can help us tailor content and suggestions for Twitter users. If you want to opt-out of this feature, set the optional data-dnt parameter to be true.
Possible values: true, false
Default: false
Requirements / Prerequisites

When using parameters within the QuickCode Tag, the different values should be separated correctly.

Colons ( : ) should be used to separate the different options; such as width and lang.

Equal signs ( = ) should be used to distinguish what the option's value is.


An example of their separation can be viewed below:



Name/Value Pairs
The preferred method is to use name/value pairs. In this approach, both the name of the parameter and its value are included in the QuickCode Tag. This allows you to set custom values for any number of the available parameters, in any order.

For example, to set custom values for just the "text" and "via" options, the QuickCode Tag would look something like this when using name/value pairs:


Note that when using name/value pairs, the parameters may be included in any order, and unused parameters may be excluded.


Values Only
Optionally, just the values of the parameters may be included. This can make the QuickCode Tag shorter in some cases, however, when including only the values of each parameter they must be kept in order.

For example, to set custom values for just the "text" and "via" options, the QuickCode Tag would look something like this when using just values:


Note that when using only the values, all parameters from the first one through the last one you use must be present and in the correct order.

Example of Use

If you wanted a large Twitter Tweet button that displays a horizontal count box, the following tag could be used:


Source Code Source Code Updated:
When a web page using a template that contains this QuickCode Tag is viewed in the storefront, the {TWITTER-TWEET-BUTTON} QuickCode Tag is changed into the source code below prior to the web page being displayed.
  Copyright © 2001 - 2024 Modular Merchant™. All rights reserved.
Modular Merchant | Privacy Policy | Legal Statement | Terms of Service | Contact Us | Site Map