The Select Template is a complicated and powerful little tool to include in Wiki pages. It lets you generate parts of your page dynamically.
It's syntax is the same as normal include pages, except it's template name is $select. It takes parameters in the normal parameter-passing form.
Some examples:
{{$select|template=Template:Mine|link=Home|sort=title asc}}
Selects all pages that link to Home, sorts them by title ascending and displays them with the Template:Mine template.
{{$select|template=Template:Yours|link=Home|link=Editing|sort=inserted desc|seperator=Template:HR|removeCategory=1}}
Selects all pages that link to both Home and Editing, sorts them by most recently created first, and displays them with the Template:Yours template. Also seperates the links with the Template:HR template, and removes all Category tags.
Syntax
template=TitleUses Title as the display template. Replaces {title} with the title of the selected page (i.e. the results).
link=Title
Selects all pages that link to this page, as well as the other links.
sort=sortkey
Sorts the results by some criteria.
seperator=Title
Uses Title as a seperator template, which is placed between results.
removeCategory=1
Removes ALL category tags, and not just the default tags that are removed (these are Category: Protected and Category: Template).
from=text
Selects all the text in the template page after this text.
to=text
Selects all text in the template page before this text.
start=n
Only selects results after the first n.
limit=n
Only selects n results.
count=1
Only select the count, and not the actual values. Instead of having elements to apply 'title' to, it instead has a variable 'count'. (See Statistics for an example.)
Valid sorts
- title asc/desc
- author asc/desc (username)
- reason asc/desc
- updated asc/desc
- inserted asc/desc
- hits asc/desc (hits in the last week)