Ceci est une ancienne révision du document !
Catégories ou Tags
La gestion des catégories se fait grâce aux plugins tag et pagelist.
A traduire, et ajouter syntaxe de pagelist, vu que les deux sont liés. Regardez les deux liens des plugins et leur texte de base pour traduire au mieux.
Plugin Tag
Le plugin Tag permet d'assigner des catégories de tags à des pages du wiki.
Balise Tag
{{tag>[liste de tags]}}
[liste de tags] | Une liste de tags séparés par des espaces décrivant le contenu de la page | Requis |
---|
{{tag>Tag1 Tag2 Tag3}}
Choisissez des tags pertinents, regardez et reprenez ceux qui existent déjà. Évitez les synonymes et ne mettez que les plus pertinents, ceux qui servent à rassembler les pages. Chacun de ces Tags (Le lien présent sur chaque tag dans la page) pointe vers une page listant toutes les autres pages portant le même tag. Ainsi les tag permettent de regrouper les pages par sujet.
Ce plugin gère aussi les espaces de noms. Si vous voulez qu'un tag (le lien associé dans la page) pointe vers une page d'un espace de nom, il faut préciser l'espace de nom juste avant le tag en employant “:
”. Si cette page n'existe pas, seules les pages ayant ce Tag seront affichées en cliquant sur ce lien :
Exemples de syntaxe :
{{tag>tag1 tag2 tag3}}
- Avec espace de nom :
{{tag>:ns1:tag1 ns1:tag2 ns2:subns1:tag3}}
Topic
{{topic>[tag]&[flags]}}
[tag] | la liste des tags pour lesquels on aimerait lister les pages les contenants | requis |
---|---|---|
[flags] | pagelist flags delimited by & , see plugin:pagelist#flags | optionnel |
Cela affiche une liste de toutes les pages qui contiennent cette catégorie de balise (tag). La liste est triée dans l'ordre alphabétique des ID de page. Vous pouvez également ajouter le modificateur +
et -
. +
Crée une intersection entre la liste des pages créées par les balises (tag) déjà définies et les pages correspondant à la balise (tag) suivant le +
(+
est un ET logique). -
supprime toutes les pages marquées avec la balise (tag) donnée de la liste des pages déjà trouvées.
Exemple:
{{topic>tag1 -tag2}}
– Liste toutes les pages taggées avec tag1 mais pas avec tag2.{{topic>tag1 +tag2}}
– Liste toutes les pages taggées avec tag1 et tag2.{{topic>tag1 tag2}}
– Liste toutes les pages taggées avec soit tag1, soit tag2, soit les deux.{{topic>ns1?tag1 tag2}}
– Liste toutes les pages dans le namespace ns1 taggée avect tag 1 ou tag2.{{topic>.?tag1 tag2}}
– Liste toutes les pages dans le namespace courant taggées avec tag1 ou tag2.{{topic>tag1 tag2 tag3&nodate&desc&sort}}
(Ajoute des options de pagelist pour modifier le design)
Searchtags
{{searchtags&[flags]}}
[flags] | pagelist flags delimited by & , see flags | optional |
---|
This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.
Example:
{{searchtags}}
– The basic syntax{{searchtags&nodate&desc&sort}}
– with pagelist options to change the design
Count
{{count>[tag]}}
[tag] | the category tag for which you want the list the occurrence | required |
---|
This part allow you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used?) in your wiki. Either you can specify a +
as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.
Example:
{{count>+}}
– List all tags with related occurrences.{{count>tag1 tag2}}
– List the occurrence of tag1 and tag2.{{count>tag1 tag2 tag3&. ns1 ns2}}
– List all occurrences for the given tags inside the namespaces (the dot specifies the root namespace)
How to use tags which consist of multiple words?
Just use an “_”, it gets automatically replaced by a “ ” i.e.:
{{tag>tag_with_multiple_words}}
Also, quotes seem to work:
{{tag>"tag with multiple words"}}
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10
Plugin Pagelist
Description
The Pagelist Plugin does – as its name says – list wiki pages in a nice way. Besides its function as a stand-alone syntax plugin, it serves as helper plugin for the Blog, Discussion, Editor, Tag, Task and Dir plugins.
Syntax
Just wrap a regular unordered list of internal links with the <pagelist>
tag:
<pagelist&[flags]> * [[..:blog:|Blog Plugin]] * [[..:discussion:|Discussion Plugin]] * [[..:editor:|Editor Plugin]] * [[..:tag:|Tag Plugin]] * [[..:wrap|Wrap Plugin|This is shown in the description cell]] </pagelist>
[flags] | flags can be used to alter the appearance of the pagelist, see flags | optional |
---|
Flags
Setting | Default | Alternative | ||
---|---|---|---|---|
style | default | table with horizontal lines | table , list or simplelist | standard DokuWiki table or list style |
showheader | noheader | hide the heading row of the pagelist table | header | show the header |
showdate | date | show the creation or last modification date | nodate | hide the date |
showuser | user | show creator or contributors | nouser | hide the user |
showdesc | nodesc | hide the description | desc | show the description (from metadata) |
showcomments | nocomments | hide the number of comments | comments | show the number of comments (if Discussion Plugin is installed) |
showtags | notags | hide the tags | tags | show the tags (if Tag Plugin is installed) |
showfirsthl | firsthl | show the first headline | nofirsthl | show the page name |
rsort/sort | nosort | no sortation of pages | rsort/sort | sorts the pages (reverse) alphabetically by pagename |
Example
<pagelist&header&comments> ... </pagelist>
This will show a list of pages with a header line and a comments column (if the Discussion Plugin is installed).
Configuration
The plugin can be configured using the DokuWiki configuration manager available in the admin menu. The settings also apply to plugins which use the helper component of the pagelist plugin, like for example the archive component of the blog plugin.
style | List style (default, list, table) |
---|---|
showheader | Show table header |
showdate | Shows/hides the date column (hide, creation date, modification date) |
showuser | Shows/hides the user column (hide, creator, contributors) |
showdesc | Shows/hides a short description taken from the first paragraph of a page (hide, max. 160 characters, max. 500 characters) |
showcomments | Shows/hides comments of a page (requires the discussion plugin) |
showlinkbacks | Shows/hides linkbacks of a page (requires the linkback plugin) |
showtags | Shows/hides tags of a page (requires the tag plugin) |
sort | Sorts the pages alphabetically by pagename |