Template:Number cat

Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:Number cat/doc.

Categorization template for use with number categories

Usage


{{Number cat |n= |nq= |by= |by2= |ntxt= |image= |seriessort= |uq= }}

Template parameters

ParameterDescriptionDefaultStatus
n
1
NumberNumber in title of category. If a QID is given, it will override this parameter with the numeric value (P1181) statement or label of that Wikidata item.emptyoptional
nq
1
Number QIDWikidata QID of the number in the title of the category, always include the 'Q'emptyoptional
byMeta CriteriaPrimary sorting criteria, indicating this category as a meta/index categoryemptyoptional
by2Meta Criteria 2secondary sorting criteria, if applicableemptyoptional
ntxtNumber as textoptional override to declare how number is written as textemptyoptional
imageImage sourceIf “n”, then the image source from property P18 of the Wikidata record NQ is used. If “file”, then the image source from the IMAGENAME parameter is used. If not present or empty, then the image source from the IMAGENAME parameter is used.emptyoptional
diffuseatDiffuse atLimit from when the category is considered crowded (only files count)200optional
seriesprefixSeries prefixemptyoptional
seriesprefixnsSeries prefix w/o space signemptyoptional
seriessuffixSeries suffixemptyoptional
seriessuffixnsSeries suffix w/o space signemptyoptional
displayDisplay tableIf “no” then the table is not displayedemptyoptional
dqDown link quantityemptyoptional
imagenameImage file name, leftFile name of the left imageemptyoptional
imagetypeImage type, leftIf “n”, then the number NC is displayed as an image. If “file”, then IMAGENAME is displayed. If “c”, then the property image (P18) of the Wikidata data object NCQ is displayed with a width of 75px.emptyoptional
langLanguageemptyoptional
localeLocaleemptyoptional
ncNumber as imageNumber to be displayed as image with a width of 20px, if IMAGETYPE = nemptyoptional
nomiNominalemptyoptional
nomiparemptyoptional
nprefixemptyoptional
nsuffixemptyoptional
nsNumber systemIf set to "wa" then Wester Arabic else "s" (standard)soptional
ntNumber typeOne of "natural" / "negative integer" / "natural with leading zero" / "nominal" / "rational" / "series" / "year", with "rational" as standardrationaloptional
onObject number is onemptyoptional
oncInput color nameSwitch input color name to fit color QID (users can add more input options including different languages), i.e. gold=goldenemptyoptional
seriesCategory seriesIf set then name part of categories to be set; currently only "Taiwan bus route" is considered; else it sets (if exists) "Category:SERIESCAT by number", "Category:SERIESCAT" and additional "Category:SERIESTYPE numbered N" or "Category:SERIESTYPE by number" otherwise sets "Category:Items numbered N"; additionally used if NT equals "year" or "y"emptyoptional
seriescatCategoryIf set then name of categories to be set or (together with SERIES) name part of categories be setemptyoptional
seriessortCategory sort phrasePhrase for sorting of categories, a leading "=" is always addedemptyoptional
seriestypeCategory series typeIf set then name part of categories to be set, or if NT equals "year" or "y" then if exists sets "Category:SERIESTYPE numbered N" (+SERIESSORT) or of not exists sets "Category:SERIESTYPE by number" (+SERIESSORT)emptyoptional
catschemeCategory schemeemptyoptional
uqemptyoptional
debugDebugIf any value then displays debug informationemptyoptional
imagernameImage file name, rightFile name of the right imageemptyoptional
ncqWikidata identifierIf set with a Wikidata Q number, then the image of property image (P18) is displayed on the right side with a width of 75px. And if NC is set, then label and description of Wikidata object NCQ is shown.emptyoptional
<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

Category:Templates using TemplateData

Categorization template for use with number categories

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Meta Criteriaby

Primary sorting criteria, indicating this category as a meta/index category

Stringoptional
Meta Criteria 2by2

secondary sorting criteria, if applicable

Stringoptional
Category schemecatscheme

Suggested values
n nmeta nc ncmeta c cmeta
Lineoptional
Debugdebug

If any value then displays debug information

Lineoptional
Diffuse atdiffuseat

Limit from when the category is considered crowded (only files count)

Default
200
Numberoptional
Display tabledisplay

If “no” then the table is not displayed

Unknownoptional
Down link quantitydq

Unknownoptional
Image sourceimage

If “n”, then the image source from property P18 of the Wikidata record NQ is used. If “file”, then the image source from the IMAGENAME parameter is used. If not present or empty, then the image source from the IMAGENAME parameter is used.

Suggested values
n file
Stringoptional
Image file name, leftimagename

File name of the left image

Fileoptional
Image file name, rightimagername

File name of the right image

Fileoptional
Image type, leftimagetype

If “n”, then the number NC is displayed as an image. If “file”, then IMAGENAME is displayed. If “c”, then the property [[d:Special:EntityPage/P18|image&#32;<small>(P18)</small>]] of the Wikidata data object NCQ is displayed with a width of 75px.

Suggested values
n file c
Lineoptional
Languagelang

Unknownoptional
Localelocale

Unknownoptional
Numbern 1

Number in title of category. If a QID is given, it will override this parameter with the P1181 statement or label of that Wikidata item.

Numberoptional
Number as imagenc

Number to be displayed as image with a width of 20px, if IMAGETYPE = n

Numberoptional
Wikidata identifierncq

If set with a Wikidata Q number, then the image of property [[d:Special:EntityPage/P18|image&#32;<small>(P18)</small>]] is displayed on the right side with a width of 75px. And if NC is set, then label and description of Wikidata object NCQ is shown.

Lineoptional
Nominalnomi

Unknownoptional
nomipar

Unknownoptional
nprefix

Unknownoptional
Number QIDnq 1

Wikidata QID of the number in the title of the category, always include the 'Q'

Stringoptional
Number systemns

If set to "wa" then Wester Arabic else "s" (standard)

Default
s
Lineoptional
nsuffix

Unknownoptional
Number typent

One of "natural" / "negative integer" / "natural with leading zero" / "nominal" / "rational" / "series" / "year", with "rational" as standard

Suggested values
nat natural neg negative integer nlz natural with leading zero nom nominal r rat rational s ser series y year
Default
rational
Lineoptional
Number as textntxt

optional override to declare how number is written as text

Stringoptional
Object number is onon

Unknownoptional
Input color nameonc

Switch input color name to fit color QID (users can add more input options including different languages), i.e. gold=golden

Unknownoptional
Category seriesseries

If set then name part of categories to be set; currently only "Taiwan bus route" is considered; else it sets (if exists) "Category:SERIESCAT by number", "Category:SERIESCAT" and additional "Category:SERIESTYPE numbered N" or "Category:SERIESTYPE by number" otherwise sets "Category:Items numbered N"; additionally used if NT equals "year" or "y"

Lineoptional
Categoryseriescat

If set then name of categories to be set or (together with SERIES) name part of categories be set

Lineoptional
Series prefixseriesprefix

Unknownoptional
Series prefix w/o space signseriesprefixns

Unknownoptional
Category sort phraseseriessort

Phrase for sorting of categories, a leading "=" is always added

Unknownoptional
Series suffixseriessuffix

Unknownoptional
Series suffix w/o space signseriessuffixns

Unknownoptional
Category series typeseriestype

If set then name part of categories to be set, or if NT equals "year" or "y" then if exists sets "Category:SERIESTYPE numbered N" (+SERIESSORT) or of not exists sets "Category:SERIESTYPE by number" (+SERIESSORT)

Lineoptional
uq

Unknownoptional

Additional information

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

The template is intended to be used by the following user groups: all users

Placement: At the top of the page

Relies on:
{{Interwiki from wikidata}}, {{Data}}, {{Label}}, {{Diffusion by condition}}, {{Display number as images}}, {{Number cat/data}} and {{Number cat/layout}}

Category:Templates using an unknown approach for internationalisation Category:Category namespace templates#Number%20cat
Category:Category namespace templates Category:Templates using TemplateData Category:Templates using an unknown approach for internationalisation