|Wikilog user manual • Introduction • Wikilogs • Articles • Advanced •|
|• Special:Wikilog • Embedding • Styling •|
It is possible to embed a list of wikilog articles in other wiki pages. Any listing that may be generated by Special:Wikilog can also be embedded like a template in other wiki pages.
This has many interesting uses:
- In the front page of the wiki, a list of the latest wikilog articles.
- In users pages, a list of that user's wikilog articles in all wikilogs.
1 Simple embedding
Simple embedding is possible by adding Special:Wikilog as a template call to any wiki page. The syntax is very similar to simple wiki link, except that
[[...]] brackets are replaced by
For example, to embed a list of the last five articles from all wikilogs filled in the History category in the current page, this markup must be added:
Articles are formatted like in Special:Wikilog page itself, except that the query form isn't shown and no navigation links are provided, only the last articles are listed.
When including or embedding a list of wikilog articles in another page, it may be desired to have the articles presented in a different format, more visually suitable for the page it is being embedded to. In this case, templated embedding is possible.
2 Templated embedding
By providing a template name to Special:Wikilog, the article listing will be formatted according to the provided template. Wikilog loads the template and expands it once for each article, filling its parameters with data from the articles.
For example, to embed a list of wikilog articles from the user John Smith using the template WikilogTempl1:
The following parameters are provided to the template:
|class|| A list of HTML classes that are suggested to be applied to a |
|wikilogTitle||The title of the wikilog where the article is published, without the namespace prefix. Suitable for presentation.|
|wikilogPage||The full page title of the wikilog where the article is published. Suitable for wikilinking.|
|title||The article title. Suitable for presentation.|
|page||The full page title of the article. Suitable for wikilinking.|
|authors||One or more authors of the article.|
|tags||Comma-separated list of article tags.|
|published|| Whether the article was published or still a draft. An asterisk is returned if the article was published, otherwise the parameter is blank. This is designed to be used with the |
|pubdate|| The article publication date and time. This is the date that the article was signed, which is the first argument to the |
|date|| The article publication date. This is the date that the article was signed, which is the first argument to the |
|time|| The article publication time. This is the time that the article was signed, which is the first argument to the |
|updated||The date and time the article was last edited. Deprecated since Wikilog 1.0.1, use 'updatedDate' and 'updatedTime' instead.|
|updatedDate||The date the article was last edited. Available since Wikilog 1.0.1.|
|updatedTime||The time the article was last edited. Available since Wikilog 1.0.1.|
|hasMore|| Whether the article has more text than provided by 'summary'. An asterisk is returned if the article contains more text, otherwise the parameter is blank. This is designed to be used with the |
|summary||The article summary.|
|comments||A link to the article comments page. The link text states how many comments are there.|
2.1 Template examples
|This page is part of the Wikilog extension user manual, which is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. The original text is available at the extension site.|