Skip to content

Commit ba99b0b

Browse files
committed
Add more globals and overrides
1 parent cccb485 commit ba99b0b

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

_includes/atts-global.html

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ <h3 id="common-global-attributes">Common global attributes</h3>
1111
{% endunless %}
1212
{% unless include.breakby == "" %}
1313
<dt><code>breakby="integer(s)"</code></dt>
14-
<dd>Used to group list items when separating by <code>break</code>. Possible values are lists of integers, like <code>2</code> (groups of 2 items) or <code>1,2</code> (alternate groups of 1 and 2 items). Otherwise, the value is evaluated on each loop and `break` happens as soon as it changes. Note that `string` must be enclosed in *double* quotes.</dd>
14+
<dd>Used to group list items when separating by <code>break</code>. Possible values are lists of integers, like <code>2</code> (groups of 2 items) or <code>1,2</code> (alternate groups of 1 and 2 items). Otherwise, the value is evaluated on each loop and <code>break</code> happens as soon as it changes. Note that <code>string</code> must be enclosed in *double* quotes.</dd>
1515
<dd><strong>Default:</strong> {% if include.breakby == null %}1 (unset){% else %}{{ include.breakby }}{% endif %} (see <a href="/tags/tag-attributes-cross-reference#breakby">breakby cross-reference</a>). </dd>
1616
{% endunless %}
1717
{% unless include.breakform == "" %}
1818
<dt><code>breakform="form name"</code></dt>
19-
<dd>A form to be used as `break`, generally jointly with `breakby` attribute. The special `<+>` pattern in this form will be replaced with the list "chunk" accumulated when break happens.</dd>
19+
<dd>A form to be used as <code>break</code>, generally jointly with <code>breakby</code> attribute. The special <code><+></code> pattern in this form will be replaced with the list "chunk" accumulated when break happens.</dd>
2020
<dd><strong>Default:</strong> {% if include.breakform == null %}unset{% else %}{{ include.breakform }}{% endif %} (see <a href="/tags/tag-attributes-cross-reference#breakform">breakform cross-reference</a>). </dd>
2121
{% endunless %}
2222
<dt><code>class="class name"</code></dt>
@@ -28,7 +28,7 @@ <h3 id="common-global-attributes">Common global attributes</h3>
2828
<dd>The value to display if the tag's output is blank.</dd>
2929
<dd><strong>Values:</strong> Any.</dd>
3030
<dd><strong>Default:</strong> {% if include.default == null %}unset{% else %}{{ include.default }}{% endif %}.</dd>
31-
31+
{% unless include.escape == "" %}
3232
<dt><code>escape="list, of, transforms"</code></dt>
3333
<dd>The transforms to apply to the output. See <a href="/tags/learning/#tag-escaping">tag escaping</a> for details.</dd>
3434
<dd><strong>Values:</strong>
@@ -50,7 +50,7 @@ <h3 id="common-global-attributes">Common global attributes</h3>
5050
<code>textile</code>,
5151
_any tag_</dd>
5252
<dd><strong>Default:</strong> {% if include.escape == null %}html{% else %}{{ include.escape }}{% endif %}.</dd>
53-
53+
{% endunless %}
5454
<dt><code>evaluate="number list"</code></dt>
5555
<dd>Alter the processing order of top-level tags inside a form/container. Tags are normally executed from top to bottom. If you wish to change this order, imagine Textpattern tags are numbered incrementally from 1 inside a container. To process tags 3 and 5 first, then 1, 2, and 4, specify <code>evaluate="3, 5"</code> in your container tag.</dd>
5656
<dd><strong>Values:</strong> Any comma-separated numbers corresponding with the numerical position of primary (top-level) tags inside the container.</dd>
@@ -70,13 +70,32 @@ <h3 id="common-global-attributes">Common global attributes</h3>
7070
<dd>The tag (without angle brackets) to wrap the label.</dd>
7171
<dd><strong>Values:</strong> Any valid HTML tag, e.g. <code>h3</code> or <code>div</code>.</dd>
7272
<dd><strong>Default:</strong> {% if include.labeltag == null %}unset{% else %}{{ include.labeltag }}{% endif %}.</dd>
73+
{% unless include.limit == "" %}
74+
<dt><code>limit="number"</code> <span class="footnote warning">v4.8.8+</span></dt>
75+
<dd>The maximum number of items top display per page in lists.</dd>
76+
<dd><strong>Values:</strong> Any integer.</dd>
77+
<dd><strong>Default:</strong> {% if include.limit == null %}unset{% else %}{{ include.limit }}{% endif %} (see <a href="/tags/tag-attributes-cross-reference#limit">limit cross-reference</a>).</dd>
78+
{% endunless %}
7379
{% unless include.not == "" %}
7480
<dt><code>not="boolean"</code></dt>
7581
<dd>Switch <code><txp:else /></code> parts.</dd>
7682
<dd><strong>Values:</strong> 0 (no) or 1 (yes).</dd>
7783
<dd><strong>Default:</strong> {% if include.not == null %}unset (0){% else %}{{ include.not }}{% endif %}.</dd>
7884
{% endunless %}
79-
85+
{% unless include.offset == "" %}
86+
<dt><code>offset="number"</code> <span class="footnote warning">v4.8.8+</span></dt>
87+
<dd>Apply the given pagination offset to the (list of) things being iterated. May be set by URL parameters.</dd>
88+
<dd><strong>Values:</strong> Any integer.</dd>
89+
<dd><strong>Default:</strong> {% if include.offset == null %}0{% else %}{{ include.offset }}{% endif %} (see <a href="/tags/tag-attributes-cross-reference#offset">offset cross-reference</a>).</dd>
90+
{% endunless %}
91+
{% unless include.sort == "" %}
92+
<dt><code>sort="column direction"</code> <span class="footnote warning">v4.8.8+</span></dt>
93+
<dd>Sort the output by the given column(s) and order direction(s).</dd>
94+
<dd><strong>Values:</strong> Specify any valid column name{% if include.sortvals != null %} from the ones given below{% endif %}, followed by a space and then either <code>asc</code> or <code>desc</code> to sort in ascending or descending order, respectively. Use <code>rand()</code> for [random sorting order](https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_rand).
95+
{% if include.sortvals != null %}{{ include.sortvals }}{% endif %}
96+
</dd>
97+
<dd><strong>Default:</strong> {% if include.sort == null %}0{% else %}{{ include.sort }}{% endif %} (see <a href="/tags/tag-attributes-cross-reference#sort">sort cross-reference</a>).</dd>
98+
{% endunless %}
8099
<dt><code>replace="string"</code></dt>
81100
<dd>Replace the content stripped via the <code>trim</code> attribute.</dd>
82101
<dd><strong>Values:</strong> Any valid string.</dd>

0 commit comments

Comments
 (0)