<tpl:Pings>

Creates a loop on all the trackbacks in the current context.

Note:

The default behavior can be overwritten and extended to the categories thanks to the attributes described below.

Attributes

lastn

Defines the maximum number of results that can be returned. This value is positive or null.

  • lastn="2" → only two trackbacks will be returned

no_context

Rewrites the current context to overload it, taking the current category and language into account if they are defined. This attribute accepts two values: 0 or 1. By default, the value is set to 0.

  • no_context="0" → the current context is kept.
  • no_context="1" → the current context is overloaded by the current category and language.

order

Defines how the results are sorted. By default, they will be sorted from the oldest to the newest. This attributes accepts two values: 'asc' and 'desc'.

  • order="asc" → the loop results will be retrieved from the oldest to the newest.
  • order="desc" → the loop results will be retrieved from the newest to the oldest.

Examples

Display every trackbacks titles and their contents

<tpl:Pings>
  <h3>{{tpl:PingTitle encode_html="1"}}</h3>
  <div class="ping-content">{{tpl:PingContent}}</div>
</tpl:Pings>

Display only the two first trackbacks

<tpl:Pings lastn="2" order="desc">
  <h3>{{tpl:PingTitle encode_html="1"}}</h3>
  <div class="ping-content">{{tpl:PingContent}}</div>
</tpl:Pings>

Wiki powered by Dokuwiki.