article
Attributes:
- customfieldname="value" • Restrict to articles with specified value for specified custom field name. Replace "customfieldname" with the name of the custom field.
- keywords="keyword(s)" • Restrict to articles with specified keyword(s).
- status="status" • Restrict to articles with specified status. Available values: draft, hidden, pending, live, sticky. Default is live.
- time="time" • Restrict to articles posted within specified timeframe. Available values: past, future, or any (both past and future). Default is past.
- sort="sort value(s)" • How to sort resulting list. Available values: ID (article id#), AuthorID (author), LastMod (date last modified), LastModID (author of last modification), Posted (date posted), Title, Category1, Category2, comments_count, Status, Section, Keywords, Image (article image id#), url_title, custom_1 through custom_10, rand() (random). When viewing a search results list, score (how well the search terms match the article) is an additional value available. Default value is Posted desc (score desc for search results).
- offset="integer" • The number of articles to skip. Default is 0.
- limit="integer" • The number of articles to display. Default is 10.
- pageby="integer" • The number of articles to jump forward or back when an older or newer link is clicked. Allows you to call the article tag several times on a page without messing up older/newer links. Default value matches the value assigned to limit.
- pgonly="boolean" • Do the article count, but do no display anything. Used when you want to show a search result count, or article navigation tags before the list of articles. Just Make sure that, other than pgonly, both article tags are identical (form-related attributes are the exception, they do not need to be assigned). Default is 0 (no).
- allowoverride="boolean" • Whether to use override forms for the generated article list. Default is 1 (yes).
- searchsticky="boolean" • When outputting search results, include articles with status "sticky". Default is 0 (no).
- form="form name" • Use specified form. Default is default.
- listform="form name" • Use specified form when page is displaying an article list.
- searchform="form name" • The form to be used for your customized search results output. Default is: search_results.
Behaviors:
The article tag can be used as either a single or container tag. When used as a container tag, wrapped content will be used as though it were defined form content. It is used to output one or more articles depending on the attributes used. Default attributes will be used when nothing specific is assigned. The tag is context-sensitive, which means it will grab articles from the currently viewed section/category/author, etc. When used on the front page, article's context will include articles from all sections set to display "On front page".
The following example will display articles that have a custom field named "colour" with a value "red" : <txp:article colour="red" />