Editing
Template:Political party/doc
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} {{Lua|Module:Political party}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> '''Template:Political party''' produces the short name or color of the provided political party. == Usage == * {{Tlx|Political party|<party name>|<value requested>}} == Parameters == <section begin="Parameters"/> {| class="wikitable" |- ! scope="col" | Parameter ! scope="col" | Description |- ! scope="row" | 1 | The political party's name. If a party is not found, place a request at the [[Module talk:Political party|talk page]].<section end="Parameters"/> |- ! scope="row" | 2 | The value requested. Currently supported values are <code>abbrev</code>, <code>color</code>, and <code>shortname </code>.<section begin="Parameters"/> |- ! scope="row" | error | Optional, this parameter will return the provided {{para|error}} value if the module does not contain the requested party or color. |}<section end="Parameters"/> ==Examples== Here are some examples using the [[Labour Party (UK)|Labour Party]] (note that there are multiple potential input names): <pre> ["Labour and Co-operative"] = "Labour Party (UK)", ["Labour Co-operative"] = "Labour Party (UK)", ... ["Labour Party (Thailand)"] = {abbrev = "", color = "#FF0000", shortname = "",}, ["Labour Party (UK)"] = {abbrev = "Lab", color = "#E4003B", shortname = "Labour",}, </pre> * {{tlx|Political party|Labour Party (UK)|abbrev}} β {{Political party|Labour Party (UK)|abbrev}} * {{tlx|Political party|Labour Party (UK)|shortname}} β {{Political party|Labour Party (UK)|shortname}} * {{tlx|Political party|Labour and Co-operative|shortname}} β {{Political party|Labour and Co-operative|shortname}} * {{tlx|Political party|Labour Co-operative|shortname}} β {{Political party|Labour Co-operative|shortname}} * {{tlx|Political party|Labour Party (UK)|color}} β {{Political party|Labour Party (UK)|color}} If the party is not present in the module, or the shortname or abbreviation are not in the module, the input party name will be returned. * {{tlx|Political party|Not-a-party|abbrev}} β {{Political party|Not-a-party|abbrev}} * {{tlx|Political party|Not-a-party|shortname}} β {{Political party|Not-a-party|shortname}} * {{tlx|Political party|Not-a-party|color}} β {{Political party|Not-a-party|color}} * {{tlx|Political party|A test no values|shortname}} β {{Political party|A test no values|shortname}} ===Lua script error messages=== If either of the required parameters are not supplied, or the color does not exist in the module, an error will be returned. * {{tlx|Political party}} β {{Political party}} * {{tlx|Political party|A test no values}} β {{Political party|Not-a-party}} * {{tlx|Political party|A test no values|color}} β {{Political party|A test no values|color}} To avoid generating a script error, use {{para|error|value}}. Note that this error value will also be passed if the party is not stored in the module. * {{tlx|Political party|A test no values|color|error{{=}}ERROR}} β {{Political party|A test no values|color|error=ERROR}} * {{tlx|Political party|Not-a-party|color|error{{=}}ERROR}} β {{Political party|Not-a-party|color|error=ERROR}} ==See also== * [[Template:Party abbr]] * [[Template:Party color]] * [[Template:Party shortname]] ==Tracking categories== * {{Category link with count|Pages using Political party with unknown party}} * {{Category link with count|Pages using Political party with missing shortname}} * {{Category link with count|Pages using Political party with missing color}} <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Political party templates]] }}</includeonly>
Edit summary
(Briefly describe your changes)
Please note that all contributions to A2wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
A2wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:=
(
edit
)
Template:Category link with count
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Lua
(
edit
)
Template:Mbox
(
edit
)
Template:Para
(
edit
)
Template:Political party
(
edit
)
Template:Strong
(
edit
)
Template:Template link expanded
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tlx
(
edit
)
Module:Arguments
(
edit
)
Module:List
(
edit
)
Module:Lua banner
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:String
(
edit
)
Module:TableTools
(
edit
)
Module:Template link general
(
edit
)
Module:Yesno
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Current events
Random page
About A2wiki
interaction
Help
Community portal
Recent changes
Upload file
Tools
What links here
Related changes
Special pages
Page information