Template:US-State: Difference between revisions

Adding categories, and turning example into subst so that I don't clutter categories (after I fix the example)
(Basic subst-only template)
 
(Adding categories, and turning example into subst so that I don't clutter categories (after I fix the example))
 
(2 intermediate revisions by the same user not shown)
Line 1:
<includeonly>{{wikipedia|{{{name}}}}}
'''{{{name}}}''' is a state in the [[{{{region}}} United States|{{{region}}} region]] of Americathe [[United States]].
 
== Advocacy ==
:''main article: [[Advocacy/United States/{{{region}}}#{{{name}}}]]''</includeonly><noinclude>
 
[[Category:{{{name}}}|*]]
[[Category:{{{region}}} United States]]
</includeonly><noinclude>
'''Template:US-State''' is a "subst only" template for US states. Go look on Wikipedia to understand what subst only templates are....
 
=== VisualEditor ===
This template can be added via [[VisualEditor]]. Here's what shows up when adding fields:
 
<templatedata>
{
"params": {
"name": {
"aliases": [
"state",
"territory"
],
"label": "State/Territory",
"description": "The name of the state or territory, with the name that is most likely to show up on [[English Wikipedia]]",
"required": true
},
"region": {
"aliases": [
"timezone"
],
"label": "Region/Timezone",
"description": "The region of the [[United States]] this is in. Typically Eastern, Central, Mountain or Pacific",
"required": true
}
},
"description": "'''Template:US-State''' is a \"subst only\" template for US states. Go look on Wikipedia to understand what subst only templates are...."
}
</templatedata>
 
== Examples ==
 
=== Example 1 ===
 
<code><nowiki>{{US-State|state=Idaho|region=Mountain}}</nowiki></code>
 
=== Result ===
 
<blockquote>{{wikipedia|Idaho}}
'''Idaho''' is a state in the [[Mountain United States|Mountain region]] of the [[United States]].
 
== Advocacy ==
:''main article: [[Advocacy/United States/Mountain#Idaho]]''</blockquote>
</noinclude>