Trackback Module Tags

ExpressionEngine includes a Trackback Module in order to provide Trackback support. The basic trackback tag consists of a tag pair:

{exp:trackback:entries}

trackback content

{/exp:trackback:entries}

Variables

content

{content}

The content or body of the trackback

switch=

{switch="option_one|option_two}

This variable permits you to alternate between any two values as the entries are displayed. The first entry will use "option_one", the second will use "option_two", the third "option_one", and so on.

The most straightforward use for this would be to alternate colors. It could be used like so:

{exp:trackback:entries}
<div class="{switch="one|two"}">
<h1>{title}</h1>
{content}
</div>
{/exp:trackback:entries}

The entries would then alternate between <div class="one"> and <div class="two">.

Multiple instances of the {switch=} tag may be used and the system will intelligently keep track of each one.

title

{title}

The title of the trackback

trackback_date

{trackback_date format="%Y %m %d %H:%i:%s"}

The date on which the trackback was received. As with other date variables, this one requires the "format" parameter in order to define how the date should be displayed. See the date variable formatting page for more information.

trackback_ip

{trackback_ip}

The IP address of the site that sent the trackback

trackback_url

{trackback_url}

The URL of the entry that sent the trackback. This leads back to the site of the person making the trackback.

weblog_name

{weblog_name}

The name of the site that sent the trackback

Trackback URL

In order to display the trackback URL for an entry, you must use the trackback URL tag:

{exp:trackback:url}

This is a single variable, so there is no pair of tags. Note that this is the URL that other people will use to submit a trackback for your entry. It is not the URL to the page you will use to display trackbacks for an entry.

Example

Here is an example of a possible use for the trackback tag:

{exp:trackback:entries}

<h3>{title}</h3>

<p>{content}</p>

<div class="posted">Tracked on: <a href="{trackback_url}">{weblog_name}</a> ({trackback_ip}) at {trackback_date format="%Y %m %d %H:%i:%s"}</div>

{/exp:trackback:entries}