allow_trackbacks

Previous page  First page  Next page

allow_trackbacks is a boolean variable that is true if trackbacks are allowed for this article.

 

Trackbacks are allowed or disallowed on a per-article basis. If the author of the article checks the Allow trackbacks checkbox, which is located in the Advanced Article Options sidebar of the Post Article or Edit Article page, allow_trackbacks is true. If the author does not check this checkbox, allow_trackbacks is false.

 

 

Example

 

Here is a very simple example:

 

{{if allow_trackbacks}}

Trackbacks have been enabled. You can see who's linking to this.

{{else}}

Trackbacks have been disabled for this article.

{{/if}}

 

In the example above, Trackbacks have been enabled. You can see who's linking to this" is displayed if comments are enabled for the article. If comments are not enabled, Trackbacks have been disabled for this article is displayed instead.

 

In the default article template, allow_trackbacks is used to determine whether the trackbacks section (the one that appears near the bottom of an article's individual page, below comments and above the comment entry form) should be displayed. Here is a simplified version of the code that does this:

 

{{if allow_trackbacks}}

{{include name="trackbacks.html"}}

{{/if}}

 

If comments are allowed, the template file trackbacks.html, which displays trackbacks, is shown.