Difference between revisions of "Template:Auc/data/year"

From blackwiki
Jump to navigation Jump to search
imported>Grufo
(New sub-template)
 
imported>Grufo
(Add TemplateData)
Line 1: Line 1:
 
<includeonly>{{#switch:{{{2|}}}|ad|auc|puc={{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|links={{{links|}}}}}{{sp}}{{{1|}}}|{{{1|}}}{{sp}}{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|links={{{links|}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>
 
<includeonly>{{#switch:{{{2|}}}|ad|auc|puc={{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|links={{{links|}}}}}{{sp}}{{{1|}}}|{{{1|}}}{{sp}}{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|links={{{links|}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"label": "Year",
 +
"description": "The year that will be shown",
 +
"type": "number"
 +
},
 +
"2": {
 +
"label": "Era",
 +
"description": "The abbreviated era",
 +
"example": "CE / BCE / AD / BC / AUC / PUC"
 +
},
 +
"abbr": {
 +
"label": "Abbreviations",
 +
"description": "Use abbreviation",
 +
"type": "string"
 +
},
 +
"links": {
 +
"label": "Links",
 +
"description": "Create internal links for the era",
 +
"type": "boolean",
 +
"default": "true"
 +
}
 +
}
 +
}
 +
</templatedata>

Revision as of 10:02, 2 October 2020

Template documentation[view] [edit] [history] [purge]

This is only a helper template of {{Auc}} that creates a year string.

Usage

E.g. {{Auc/data/year|2003|CE|abbr=off}} → 2003Template:SpCommon Era

No description.

Template parameters

ParameterDescriptionTypeStatus
Year1

The year that will be shown

Numberoptional
Era2

The abbreviated era

Example
CE / BCE / AD / BC / AUC / PUC
Unknownoptional
Abbreviationsabbr

Use abbreviation

Stringoptional
Linkslinks

Create internal links for the era

Default
true
Booleanoptional

E.g. {{Auc/data/year|258|AUC|alink=off|flip}} → 258Template:SpAUC

No description.

Template parameters

ParameterDescriptionTypeStatus
Year1

The year that will be shown

Numberoptional
Era2

The abbreviated era

Example
CE / BCE / AD / BC / AUC / PUC
Unknownoptional
Abbreviationsabbr

Use abbreviation

Stringoptional
Linkslinks

Create internal links for the era

Default
true
Booleanoptional

Parameters

No description.

Template parameters

ParameterDescriptionTypeStatus
Year1

The year that will be shown

Numberrequired
Era2

The abbreviated era

Example
CE / BCE / AD / BC / AUC / PUC
Stringrequired
Flip3

Invert the order of year and era

Example
flip
Stringoptional
Abbreviationsabbr

Use abbreviation

Stringoptional
Automatic linkalink

Create internal link for the era

Default
true
Example
on / yes / true / off / no / false
Booleanoptional
Pagepage

A Wikipedia article for the specific year; if specified it overrides the |links= parameter

Pageoptional

No description.

Template parameters

ParameterDescriptionTypeStatus
Year1

The year that will be shown

Numberoptional
Era2

The abbreviated era

Example
CE / BCE / AD / BC / AUC / PUC
Unknownoptional
Abbreviationsabbr

Use abbreviation

Stringoptional
Linkslinks

Create internal links for the era

Default
true
Booleanoptional