Skip to content

Commit 41e30f0

Browse files
authored
added fields attribute
1 parent ad6b126 commit 41e30f0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tags/article_custom.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ Tag will accept the following attributes (**case-sensitive**) as well as the {%
126126
: Restrict to articles posted within the specified year/month/day or between the given date and the `time` attribute.
127127
: **Default:** unset.
128128

129+
`fields` <span class="footnote warning">v4.8.0+</span>
130+
: Restrict articles by field name.
131+
: **Default:** unset.
132+
129133
`offset="integer"`
130134
: The number of articles to skip.
131135
: **Default:** `0`.
@@ -319,6 +323,27 @@ Outputs articles specified by list of IDs, in the order given in the `sort` fiel
319323

320324
Outputs the number of live articles belonging to the current section.
321325

326+
327+
### Example 9: filter field
328+
329+
~~~ html
330+
<txp:article_custom time="-1 year" fields="authorid, posted=max" sort="Posted DESC">
331+
<txp:author /> (<txp:posted />)
332+
</txp:article_custom>
333+
~~~
334+
335+
Outputs recently active authors with their latest article publish dates
336+
337+
### Example 9a: filter field
338+
339+
~~~ html
340+
<txp:article_custom time="-1 year" fields="authorid" sort="Posted DESC">
341+
<txp:author /> (<txp:posted />)
342+
</txp:article_custom>
343+
~~~
344+
345+
Outputs recently active authors with their latest article publish dates
346+
322347
## Genealogy
323348

324349
### Version 4.7.2

0 commit comments

Comments
 (0)