plugin:wst
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:wst [2022-07-06 12:23] – glreschke | plugin:wst [2024-03-20 18:18] (current) – [Conflict between the move plugin and the wiki style template plugin] 193.138.218.203 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Wikimedia Style Templates ====== | + | ====== |
---- plugin ---- | ---- plugin ---- | ||
Line 7: | Line 7: | ||
type : syntax | type : syntax | ||
lastupdate : 2018-07-22 | lastupdate : 2018-07-22 | ||
- | compatible : 2018-04-22 2017-02-19b 2016-06-26, Hogfather, Igor | + | compatible : Greebo, Hogfather, Igor, Jack Jackrum |
depends | depends | ||
conflicts | conflicts | ||
Line 21: | Line 21: | ||
---- | ---- | ||
- | This plugin provides a syntax for WikiMedia-style templates. | + | This plugin provides a syntax for [[wp> |
===== Installation ===== | ===== Installation ===== | ||
+ | |||
Search and install the plugin using the [[plugin: | Search and install the plugin using the [[plugin: | ||
If you install this plugin manually, make sure it is installed in '' | If you install this plugin manually, make sure it is installed in '' | ||
+ | |||
+ | |||
===== Examples/ | ===== Examples/ | ||
+ | |||
Let's assume that we need to add the same fragment to many articles, something like "The main article for this section is [link]" | Let's assume that we need to add the same fragment to many articles, something like "The main article for this section is [link]" | ||
Let's also assume that the default namespace for our templates is set to " | Let's also assume that the default namespace for our templates is set to " | ||
+ | |||
==== Minimal example ==== | ==== Minimal example ==== | ||
Line 36: | Line 41: | ||
First, we create a new page called " | First, we create a new page called " | ||
- | <file txt template: | + | <file txt template: |
+ | //The main article for this section is **[[: | ||
+ | </ | ||
Now go to the desired article and insert the following code: | Now go to the desired article and insert the following code: | ||
Line 45: | Line 52: | ||
//The main article for this section is **[[: | //The main article for this section is **[[: | ||
+ | |||
==== Includeonly tag ==== | ==== Includeonly tag ==== | ||
+ | |||
The template in the minimal example works fine, but our " | The template in the minimal example works fine, but our " | ||
Line 53: | Line 62: | ||
Let's change the template so that the desired text appears on other pages (where the template code **< | Let's change the template so that the desired text appears on other pages (where the template code **< | ||
- | <file txt template: | + | <file txt template: |
+ | < | ||
+ | </ | ||
| | ||
Now the template page looks empty, although it contains the template code. | Now the template page looks empty, although it contains the template code. | ||
==== Noinclude tag ==== | ==== Noinclude tag ==== | ||
+ | |||
Instead of showing the ugly template code (and instead of showing an empty page), let's add some text that would appear on the template page, but not on pages where the code **< | Instead of showing the ugly template code (and instead of showing an empty page), let's add some text that would appear on the template page, but not on pages where the code **< | ||
- | <file txt template: | + | <file txt template: |
+ | < | ||
- | < | + | < |
+ | </ | ||
==== Template complete with documentation ==== | ==== Template complete with documentation ==== | ||
+ | |||
When creating a template, it would be nice to also create a documentation for the users. One way to create documentation is to create another template, say " | When creating a template, it would be nice to also create a documentation for the users. One way to create documentation is to create another template, say " | ||
- | <file txt template: | + | <file txt template: |
+ | ====== Documentation: | ||
< | < | ||
+ | |||
===== Syntax ===== | ===== Syntax ===== | ||
+ | |||
< | < | ||
+ | |||
===== Output ===== | ===== Output ===== | ||
- | //Main article for this section is **[[category: | ||
- | <file txt template:main>< | + | //Main article for this section is **[[category:article|Article_name]]**.// |
+ | </file> | ||
- | < | + | <file txt template: |
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
===== Syntax ===== | ===== Syntax ===== | ||
+ | |||
A basic syntax for templates created with WST plugin is: | A basic syntax for templates created with WST plugin is: | ||
- | < | + | |
where: | where: | ||
* the template code is always wrapped between double curled brackets; | * the template code is always wrapped between double curled brackets; | ||
Line 89: | Line 115: | ||
==== Named and numbered parameters ==== | ==== Named and numbered parameters ==== | ||
+ | |||
By default, each argument can be referred by its ordinal number, i.e. < | By default, each argument can be referred by its ordinal number, i.e. < | ||
- | < | + | |
In this notation, the actual order of arguments does not matter any more. | In this notation, the actual order of arguments does not matter any more. | ||
Line 97: | Line 124: | ||
Besides this, arguments can be referred to by a name. For example, in the following code | Besides this, arguments can be referred to by a name. For example, in the following code | ||
- | < | + | |
- | the parameter can be referred to by < | + | the parameter can be referred to by '' |
==== Tags ==== | ==== Tags ==== | ||
+ | |||
* **< | * **< | ||
* **< | * **< | ||
+ | |||
===== Configuration and Settings ===== | ===== Configuration and Settings ===== | ||
+ | |||
The only setting available is " | The only setting available is " | ||
===== Development ===== | ===== Development ===== | ||
- | // | ||
- | === Change Log === | ||
- | // | + | === Change Log === |
* **2017-04-17** | * **2017-04-17** | ||
Line 120: | Line 148: | ||
=== Known Bugs and Issues === | === Known Bugs and Issues === | ||
- | //[this section might not be needed in case of external bug manager, or use RSS feed]// | + | |
=== ToDo/Wish List === | === ToDo/Wish List === | ||
Line 128: | Line 156: | ||
===== FAQ ===== | ===== FAQ ===== | ||
- | //[discussions should ideally be deleted and turned into FAQ entries along the way]// | + | * [[~: |
===== Discussion ===== | ===== Discussion ===== | ||
+ | |||
Does this only work for links. | Does this only work for links. | ||
+ | |||
+ | This plugin is not supporting backlinks, so there is no way to use dokuwiki backlinks functionality for links in templates. Also because of that there is no way of knowing which pages include template page. \\ -- // | ||
+ | |||
+ | > It's worth mentioning in the discussion that this isn't always an undesirable feature, for instance when creating inter page link lists etc that would muddle the meaning of a page-link by adding links all over the place. | ||
+ | > | ||
+ | > Also, you can find the usage of a template with the search engine. It will hit ''" | ||
+ | |||
+ | |||
+ | ==== Localization, | ||
+ | |||
+ | I am the current maintainer of [[plugin: | ||
+ | |||
+ | Could the developer: | ||
+ | - Add this plugin to https:// | ||
+ | - Move this to GitHub instead of BitBucket? | ||
+ | - In '' | ||
+ | |||
+ | --- [[user> | ||
+ | |||
+ | ==== ParserFunctions ==== | ||
+ | Please, try my [[ParserFunctions]] plugin, it's a perfect companion for WST and [[Templater]]. | ||
+ | |||
+ | --- [[user> | ||
+ | |||
+ | |||
+ | ==== Conflict between the move plugin and the wiki style template plugin ==== | ||
+ | |||
+ | I reported [[https:// | ||
+ | |||
+ | I'm reporting this here because there doesn' | ||
+ | |||
+ | |||
+ | |||
+ |
plugin/wst.1657103010.txt.gz · Last modified: 2022-07-06 12:23 by glreschke