The basic article tag is a Single Tag and generally used in a Page template. The tag is used to output one or more articles depending on Attributes used. Default attributes will be used when nothing specific is assigned.
article 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 article tag has the following syntactic structure…
<txp:article />
Tag will accept the following attributes (case-sensitive):
Restrict to articles with specified value for specified custom field name. Replace “customfieldname” with the name of the custom field.
Restrict to articles with specified keyword(s).
Restrict to articles with specified status. Available values: draft, hidden, pending, live, sticky. Default is live.
Restrict to articles posted within specified timeframe. Available values: past, future, or any (both past and future). Default is past.
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).
The number of articles to skip. Default is 0.
The number of articles to display. Default is 10.
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.
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).
Whether to use override forms for the generated article list. Default is 1 (yes).
When outputting search results, include articles with status “sticky”. Default is 0 (no).
Use specified form. Default is default.
Use specified form when page is displaying an article list.
The form to be used for your customized search results output. Default is: search_results.
<txp:article form="default" limit="5" />
<txp:article offset="2" limit="5" />
<div id="first"><txp:article limit="1" pageby="10" /></div> <div id="middle"><txp:article limit="8" offset="1" pageby="10" /></div> <div id="last"><txp:article limit="1" offset="9" pageby="10" /></div>
The pageby number should be the total number of articles displayed on the page. Without pageby, each article tag would page independently based on its own limit, as if it was the only article tag.
<txp:article limit="5" pageby="10" /> <!-- google ad --> <txp:article limit="5" offset="5" pageby="10" />
<txp:article colour="red" />
<txp:article sort="AuthorID asc, Posted asc" />