No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
==Creating page lists== | ==Creating page lists== | ||
=== Show pages in a particular namespace === | |||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
{{#ask: | {{#ask: | ||
[[:+]] | [[:+]] <!-- find all pages in the main namespace --> | ||
[[Modification date::+]]<!-- necessary to filter deleted pages --> | [[Modification date::+]]<!-- necessary to filter deleted pages --> | ||
|format=ul | |format=ul | ||
|limit=4 | |limit=4 | ||
}} | }} | ||
</syntaxhighlight><br />{{#ask: | </syntaxhighlight>Output example in list style format:<br />{{#ask: | ||
[[:+]][[Modification date::+]] | [[:+]][[Modification date::+]] | ||
|format=ul | |format=ul | ||
|limit=4 | |limit=4 | ||
}} | }} | ||
'''Notes:''' | '''Notes:''' | ||
<code><nowiki>[[:+||Help:+]]</nowiki></code>shows pages | <code><nowiki>[[:+]]</nowiki></code> shows pages from the ''Main'' namespace. | ||
<code><nowiki>[[Myspace:+]]</nowiki></code> shows pages from the namespace ''Myspace''. | |||
<code><nowiki>[[:+||Help:+]]</nowiki></code> shows pages from both the ''Main'' namespace and the namespace ''Help'' (=OR argument) | |||
===Output in category style=== | ===Output in category style=== | ||
Line 28: | Line 34: | ||
|limit=12 | |limit=12 | ||
}} | }} | ||
</syntaxhighlight> | </syntaxhighlight>Output example:{{#ask: | ||
{{#ask: | |||
[[:+]][[Modification date::+]] | [[:+]][[Modification date::+]] | ||
|format=category | |format=category |
Revision as of 14:37, 26 April 2022
Here you can see some examples for simple queries using the metadata of a wiki page. You can add these queries to any wiki page.
Creating page lists
Show pages in a particular namespace
{{#ask:
[[:+]] <!-- find all pages in the main namespace -->
[[Modification date::+]]<!-- necessary to filter deleted pages -->
|format=ul
|limit=4
}}
Output example in list style format:
- Accessibility
- Accessibility/Extensions
- Accessibility/Extensions/legacy list
- Accessibility/Extensions/notchecked
Notes:
[[:+]]
shows pages from the Main namespace.
[[Myspace:+]]
shows pages from the namespace Myspace.
[[:+||Help:+]]
shows pages from both the Main namespace and the namespace Help (=OR argument)
Output in category style
{{#ask:
[[:+]][[Modification date::+]]
|format=category
|limit=12
}}
Output example:
A
A cont.
Show pages from a category
{{#ask:
[[Category:Administration]]
| limit=4
| searchlabel=
| format=ol
}}
Pages that start with the same page name string
{{#ask:
[[~Visu*]][[:+||Manual:+]]
[[Modification date::+]]<!-- necessary to filter deleted pages -->
| limit=5
| searchlabel=
| format=ol
}}
List of pages in the Main namespace and in the namespace Manual that begin with "Visu".
Results format: Table
Format "broadtable"
{{#ask:
[[~Visu*]][[:+||Manual:+]]
[[Modification date::+]]<!-- necessary to filter deleted pages -->
| limit=5
| searchlabel=
| format=broadtable
}}
Format "datatable"
{{#ask:
[[~Visu*]][[:+||Handbuch:+]]
[[Modification date::+]]<!-- necessary to filter deleted pages -->
| limit=5
| searchlabel=
| format=table
| class=datatable
}}
Related info