{{#ifeq:doc |doc
|
{{#ifeq:show |show
|
40px | This is a documentation subpage for 模板:Current election. It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:模板 |用户 |模板 template page |{{#if:模板 |模板 page|article}}}}}}}}. |
}}{{#if: | | {{#ifexist:模板:Current election | [[Category:{{#switch:模板 |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
40x40px | This template should not be substituted. |
30px | This template uses Lua: |
This template displays the tag above and adds articles to Category:Current elections or one of its dated subcategories.
Guidelines编辑
- Note that every article on Wikipedia has a General disclaimer indicating that the article contents may not be accurate.
- Generally it is expected that this template and its closely related templates will appear on an article for a few days; occasionally longer.
- If you desire that an article be noticed as a topic about or related to a significant current event, see Wikipedia:How the Current events page works, and also Wikipedia:In the news/Candidates
- Check main (article) namespace links
Usage编辑
The template takes three parameters:
- Parameter 1 overrides the word "article"
- Parameter 2 overrides the words "a current election"
- Parameter 3 overrides the word "election"
- Named parameter "date" categorizes into a monthly sub category for ease of maintenance. This will be added by a bot if omitted.
Examples编辑
Code | Result | ||||||
---|---|---|---|---|---|---|---|
{{current election}}
|
| ||||||
{{current election|section|date=11月 2024}}
|
| ||||||
{{current election| |a recent election|date=11月 2024}}
|
| ||||||
{{current election| | |referendum|date=11月 2024}}
|
|
Template data编辑
|={{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee the monthly parameter usage report for {{#if:|[[Template:]]|this template}}.
|None|none=Parameter usage report |for|For=Parameter usage report for {{#if:|[[Template:]]|Template:Current election}}. |#default=[1]
}}|This is the {{#if:|TemplateData|TemplateData}} documentation for this template used by VisualEditor and other tools; {{#switch:
|={{#ifeq:{{safesubst:#switch: yes |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee the monthly parameter usage report for {{#if:|[[Template:]]|this template}}.
|None|none=Parameter usage report |for|For=Parameter usage report for {{#if:|[[Template:]]|Template:Current election}}. |#default=[2]
}}}}
TemplateData for Current election
{{#switch:
{{#if: | {{{demospace}}} | {{#ifeq:模板|模板 | template | other }} }}
| template = {{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}||
}} | other | #default = }} <templatedata> { "params": { "1": { "label": "Type (typically section)", "description": "Something to replace \"article\" in the template, typically \"section\"", "type": "string", "default": "article" }, "2": { "label": "Type", "description": "Allows modification of the current link instead of displaying \"a current election\"", "example": "a current referendum", "type": "string", "default": "a current election" }, "3": { "label": "Election type", "description": "Overrides the word \"election\"", "example": "referendum", "type": "string", "default": "election" }, "date": { "label": "Date", "description": "The month and year that the article is identified as current.", "example": "May 2015", "type": "date", "required": true } }, "description": "This template generates a tag to indicate that the article documents a current event.", "format": "inline" } </templatedata>
See also编辑