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 (created, publishDate, title....) or random | sort on column asc or desc | 1.10 | ||
| order | ArticleId separated with vertical bar | Will put the articles at the top if the list if the article is displayed in the page in the order of the param | 9.0 | ||
| articleId | ArticleId separated with vertical bar | Will only display these articlesId - other filters are also applies | 9.0 | ||
| notArticleId | ArticleId separated with vertical bar | Will not display these articlesId | 9.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 | ||
| largefirstimage | y or n | if y, the first image will be displayed with the dimension used for the view of the article | 6.0 | ||
| urlparam | url param | Additional params to add to tiki-read_articles.php (Ex: from=y) | 6.0 | ||
| actions | y or n | y | Param to show links and buttons to perform actions with each article shown, if permissions are met. When set to 'n', no link to 'Add a comment' will be shown, nor the buttons to edit the article, etc. | 6.1 | |
| usePagination | y or n | n | Activate pagination when articles listing are long | ||
| Maximum Displayed | numeric | The number of articles to display in the list (no max set by default). If Pagination is set to y (Yes), this will determine the amount of articles per page. This is needed if Use Pagination is activated. | |||
| periodQuantity | numeric | n | Numeric value to display only articles created within a user defined time-frame. Used in conjunction with the next parameter "Period unit", this parameter indicates how many of those units are to be considered to define the time frame. Use in conjunction with "max=-1" to list all items (by default "max" is set to 10). | 6.5, |
|
| periodUnit | hour/day/week/month | n | Time unit used with "Period quantity" | 6.5, |
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
