recent articles
From Textbook
<txp:recent_articles />
The recent_articles tag is a single tag which is used to produce a list of permanent links to recent articles by title.
Contents |
Attributes
Tag will accept the following attributes (case-sensitive):
- section="section_name"
- Restrict to articles from specified section(s).
- Values: (comma separated list of) section name(s).
- Default: unset.
- category="category name"
- Restrict to articles from specified category/ies. Note: category names may be different to the Title you typed when you created the category. Check the Categories tab to ensure you are using the correct names.
- Values: (comma separated list of) category name(s).
- Default: unset.
- sort="sort value(s)"
- How to sort resulting list.
- Values:
ID(article id#)AuthorID(author)LastMod(date last modified)LastModID(author of last modification)Posted(date posted)TitleCategory1Category2comments_countStatusSectionKeywordsImage(article image id#)url_titlecustom_1throughcustom_10
(From 4.2.0 on:custom_n)rand()(random).
- Default:
Posted desc. - limit="integer"
- Number of articles to display.
- Default:
10. - no_widow="boolean"
- Whether to inhibit line breaks in titles which would leave just a single word on the last line (widows).
- Values:
0single words allowed;1single words not allowed on their own line - Default: Whatever is set in Advanced Preferences
- label="text"
- Label for the top of the list.
- Default:
Recent Articles. - labeltag="tag"
- (X)HTML tag (without brackets) to wrap around label.
- Default: unset.
- wraptag="tag"
- (X)HTML tag (without brackets) to wrap around list.
- Default: unset.
- break="value"
- (X)HTML tag (without brackets) or string used to separate list items.
- Default:
br. - class="class name"
- (X)HTML class attribute to be applied to wraptag.
- Default:
recent_articles.
Examples
Example 1: Labelled list of recent articles
<txp:recent_articles label="Latest and Greatest" limit="5" />
Example 2: List of recent articles by category
<txp:recent_articles label="Latest" break="br" wraptag="p" category="code" sort="Section desc" />
Example 3: Styled recent article list
<txp:recent_articles label="Recently" break="li" wraptag="ul" />
Styles could go this way
.recent_articles {
list-style-type:none;
}
Genealogy
Version 4.0.6
- support added for comma separated lists for section and category attributes




