Template:Infobox election/type election
Template documentation[[{{fullurl:
This template uses TemplateStyles: |
Warning: This template gets personalization information from Module:Itemgroup/list and Module:Itemgroup/groups |
Technical documentation about operation of {{Infobox election}}
and its sub-templates.
Inventory and relationships between subtemplates
edit- Workflow
- Template:Infobox election: It is the entry point. Its functions are:
- Manage configuration settings. If any WP wanted to use a language version of these parameters it would be in this template where the conversion should take place and avoid having to modify any other sub-templates.
- template:Infobox election/type_election: Determine the type of election. A) indicated manually in
type_election
, B) using the voting system (P8196), C) deduced according to certain contents of the items involved. - Obtain and transfer a set of values that require a complex code and are later widely used in other sub-templates.
- template:Infobox election/moment:Determines whether the day the infobox is viewed is before, during the campaign, or after election day. It allows to show small differences in content.
- template:Infobox election/core:Retrieves the information from the P726, determines and invokes the processes to be performed according to the type of choice and the current time. All content except the result boxes is placed directly from this template with the
{{InfoboxFrame}}
. - template:Infobox election/prepare:Based on the information of the candidate who provides
/core
, this sub-template complements it with the results of P991, calls/prepare_prev_results
to makes the differential calculations with the data of the previous election and transfers it to/showblocks
- template:Infobox election/prepare_prev_results: Sub-function to simplify the calculation code of differences with the previous edition.
- template:Infobox election/prepare multi: In multi-voting processes, make the various calls to
/prepare
for a candidate, adding information regarding each election. - template:Infobox election/showblocks: Prepares the graphical representation of the boxes with results: of electoral participation and of results of the candidates, Any aspect relative to the format, icons, colors and layout of this part of the infobox is managed from here.| action=edit&preload=Template:Documentation/preload }} create]]
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) page. Subpages of this template. |
proportional