Special Templates / Search

Sub-page of SpecialTemplates

The search template special:search allows you to include a list of pages that include a certain template or set a defined value within a template.

This template is especially useful for index and category pages.

Note: due to "aggressive" caching, your browser may not show a complete list of all pages. If you want to make sure, then force a hard reload (shift+reload or ctrl+reload depending on browser). But usually, this should not be a problem.

Parameters

The template understands following parameters:

template
search for pages containing the named template. The value is the name of the template.
Example: template=HowTemplatesWork/Example
parameter
search for pages setting a parameter in a template. The value is "template name" ":" (colon) "parameter name".
Example: parameter = how templates work / example : name
value
defines the value for a searched for parameter.
Example: value=Arno

Examples

We define the example template in 'hidden mode' here, with name=Dieter.

Searching for templates

 {{special:search | template=HowTemplatesWork/Example }}

yields

No matching pages found.

Searching for parameters

 {{special:search | parameter=HowTemplatesWork/Example:name }}

yields

No matching pages found.

Searching for parameter with defined value

 {{special:search
 | parameter=HowTemplatesWork/Example:name
 | value=Dieter
 }}

yields

No matching pages found.


This is a copy of the living page "Special Templates / Search" at Sensei's Library.
(OC) 2016 the Authors, published under the OpenContent License V1.0.
[Welcome to Sensei's Library!]
StartingPoints
ReferenceSection
About