Difference between revisions of "Template:RAPID-Overview-Vars"

From Open Energy Information

(add international vars for fullJur)
(add new variable for international jurisdictions)
 
Line 20: Line 20:
 
{{#vardefine:currentJur|{{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1|3}}|Federal|Federal|{{#titleparts:{{FULLPAGENAME}}|1|3}}}}}}
 
{{#vardefine:currentJur|{{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1|3}}|Federal|Federal|{{#titleparts:{{FULLPAGENAME}}|1|3}}}}}}
 
{{#switch: {{#var:currentJur}}
 
{{#switch: {{#var:currentJur}}
| Canada = {{#vardefine:abbrJur|CAN}}
+
| Canada = {{#vardefine:abbrJur|CAN}}{{#vardefine:cntry|CAN}}
| Alberta = {{#vardefine:abbrJur|AB}}
+
| Alberta = {{#vardefine:abbrJur|AB}}{{#vardefine:cntry|CAN}}
| British Columbia = {{#vardefine:abbrJur|BC}}
+
| British Columbia = {{#vardefine:abbrJur|BC}}{{#vardefine:cntry|CAN}}
| Manitoba = {{#vardefine:abbrJur|MB}}
+
| Manitoba = {{#vardefine:abbrJur|MB}}{{#vardefine:cntry|CAN}}
| New Brunswick = {{#vardefine:abbrJur|NB}}
+
| New Brunswick = {{#vardefine:abbrJur|NB}}{{#vardefine:cntry|CAN}}
| Ontario = {{#vardefine:abbrJur|ON}}
+
| Ontario = {{#vardefine:abbrJur|ON}}{{#vardefine:cntry|CAN}}
| Quebec = {{#vardefine:abbrJur|QC}}
+
| Quebec = {{#vardefine:abbrJur|QC}}{{#vardefine:cntry|CAN}}
| Saskatchewan = {{#vardefine:abbrJur|SK}}
+
| Saskatchewan = {{#vardefine:abbrJur|SK}}{{#vardefine:cntry|CAN}}
| Yukon = {{#vardefine:abbrJur|YT}}
+
| Yukon = {{#vardefine:abbrJur|YT}}{{#vardefine:cntry|CAN}}
| Mexico = {{#vardefine:abbrJur|MEX}}
+
| Mexico = {{#vardefine:abbrJur|MEX}}{{#vardefine:cntry|MEX}}
 
| Federal = {{#vardefine:abbrJur|FD}}
 
| Federal = {{#vardefine:abbrJur|FD}}
 
| Alabama = {{#vardefine:abbrJur|AL}}
 
| Alabama = {{#vardefine:abbrJur|AL}}

Latest revision as of 16:02, 20 August 2019

This template assists RAPID Overview pages with setting respective variables:

  1. currentTech
  2. currentJur (jurisdiction)
  3. currentTopic

and encode the following:

  1. full jurisdictions into an abbreviation
  2. topic names into corresponding numeric values

This template is used by: