Display multiple articles in a wiki page
Plugin Articles
Use this Wiki Plugin to include any number of articles into a wiki page. For a plugin that includes components of a single article, see pluginArticle. This is particularly useful if you want to include the top 2 articles into your homepage, but being anyway able to write some custom Wiki text.For a quick summary of a list of articles you can also use pluginModule to display Module last_articles.
Usage
To display articles in a wiki page, use the syntax:ARTICLES(max=>3, topic=>tw,topicId=>1, type=>news, categId=>1, lang=>en, sort=>lastModif_asc)}{ARTICLES}| Param | Values | Defaults | Req ? | Explanation | Since |
|---|---|---|---|---|---|
| max | Numeric | Meant to control number of articles | |||
| topic | string | Filter on the topics. Example: 'News', '!News', 'News+Events', '!News+Events' | |||
| topicId | string | Filter on topic Ids. Example: '1', '!1', '1+2', '!1+2' | 1.10 | ||
| type | string | Filter on the types. Example: 'Article', '!Article', 'Article+Review', '!Article+Review' | |||
| categId | Numeric | Filter on the category Id | |||
| lang | String(en,fr,en_uk...) | Language | 1.9.7 | ||
| sort | String(columnName_asc or columnName_desc where columnName is a column name (lastModif) or random | sort on column asc or desc | 1.10 | ||
| random | String(y,n) | Picks a certain number of articles randomly, depending of the max value | 3.0 | ||
| start | Numeric | List starts with this article number | 5.0 | ||
| fullbody | y or n | set to y or n, and specifies whether the whole Article is displayed versus just the Header and Title | 5.0 | ||
| dateStart, dateEnd | date | using a YYYY-MM-DD format, Articles with their publish date greater than dateStart and less than or equal to dateEnd are included | 5.0 | ||
| overrideDates | y or n | this should be set to y so that if the Type parameters "Show before publish date" or "Show after expire date" have not been set the appropriate Articles can still be extracted using dateStart and dateEnd values which may be 'outside' the publish or expire dates | 5.0 | ||
| containerClass | text | text that specifies a css class style used to style the resultant display | 5.0 |
Example
In this example below, a wiki page is shown including the articles plugin, so that last articles are shown below the "! News" heading of the page:
In that example, the syntax was:
{ARTICLES(max=>5,topicId=>!5)}{ARTICLES}When topic="!New+Events', only the articles that have not a topic News or a topic Events will be displayed. You can put as many topics you want by separating them with the character '+'.The character '!' means not - It can be only on first place. Do not put space around the separator.
Multilingualism
The multilinguism is managed on 2 aspects:- If you have selected the multilingualism and best_language features, and when this plugin is inserted in a page that has a defined language, some articles can be filtered out. For each set of translations, when one article of this set has the same language as the page language, only this article in the set will be displayed. Please note that you can still see an article of another language, if this article is not in a set of translations or if this set of translations has no article in the page language.
- If you use the parameter lang, only the articles in this language will be shown
Contributors to this page: lindon
,
eromneg
,
Urbizzness
,
aproulx
,
Xavi
,
mlpvolt
,
marclaporte
,
luci
and
sylvie
.
Page last modified on Thursday 25 February, 2010 03:36:37 UTC by lindon
.
Sidebar
Featured links
Last changes
Freetags editor
Sidebar
To register
To have an account at this site, please register at Tikiwiki.org
, and then use that user name and password to log in here.
