Template:Allpages/doc

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

This template builds a link to a specified Special pages of the Allpages type within the Namespace selected by {{{1}}} and the modifier {{{2}}}, which is expected to be an alphanumeric value beginning a string.

Usage

{{Allpages |1= |2= }}

Help with 2nd parameter
All {{Allpages|Help|D}} pages starting from '''D''' gives
All Help pages starting from D
All {{Allpages|Category|M}} pages starting from '''M''' gives
All Category pages starting from M
All {{Allpages|main|Eur}} pages starting from '''Eur''' gives
All Category pages starting from Eur
Mediawiki_talk
{{Allpages|9}} pages without using '''{{ns:9}}''' gives
MediaWiki talk pages without using MediaWiki talk
Main namespace (0 or void)
All {{Allpages||x}} pages starting from '''x''' gives
All (Gallery) pages starting from x
Special or -1
{{Allpages|-1|from}} pages ignore the 2nd parameter gives
Special pages ignore the 2nd parameter
Media or -2
{{Allpages|-2}} doesn't work at all gives
Media doesn't work at all
Project or 4
{{Allpages|project}} won't work, use {{ns:project}} gives
{{Allpages|project}} won't work, use Commons
{{Allpages|{{lc:{{ns:4}}}}}} won't work, use {{ns:4}} gives
{{Allpages|commons}} won't work, use Commons

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This template builds a link to a specified Special pages of the Allpages type within the Namespace selected by {{{1}}} and the modifier {{{2}}}, which is expected to be an alphanumeric value beginning a string.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
namespace1

The namespace

Default
main namespace
Stringrequired
from2

Pages listed from this string listed

Stringoptional
substitutionsubst

Add "subst:" to fix the substituting of this template.

Stringoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Localization

This template is not intended to be localized.