Difference between revisions of "Modèle:RC/Data/doc"

From Wazeopedia

< Modèle:RC‎ | Data

(fixed double redirect)
(→‎Examples : Added more examples)
Line 1: Line 1:
#REDIRECT [[Creating and editing road segments#Confirm_the_road_by_updating_details]]
+
{{doc subpage}}
 +
<!-- ADD DOCUMENTATION BELOW THIS LINE -->
 +
This template is a part of a suite of subpage templates (listed below) used for the [[Regional Coordinator | Regional Coordinator]] table.
 +
 
 +
This template serves as a lookup table for the Regional and State/Territory forums mainly in the USA. It could be modified to work for other countries, but currently does not.
 +
 
 +
== Usage ==
 +
This content is used directly and also through the {{tl|RC/Forum}} template.
 +
 
 +
== Examples ==
 +
{| class="wikitable"
 +
|+ Examples for pagename California
 +
! Template
 +
! Result
 +
|-
 +
| {{tl|RootPage2}}
 +
| California
 +
|-
 +
| {{tlx|RC/Data|<nowiki>{{RootPage2}}</nowiki>|region-name}}
 +
| {{RC/Data|CA|region-name}}
 +
|-
 +
| <code><nowiki>{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|state-list}}</nowiki></code>
 +
| {{RC/Data|{{RC/Data|CA|region-name}}|state-list}}
 +
|-
 +
| <code><nowiki>{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|state-list-long}}</nowiki></code>
 +
| {{RC/Data|{{RC/Data|CA|region-name}}|state-list-long}}
 +
|-
 +
| <code><nowiki>{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|regional-coordinator}}</nowiki></code>
 +
| The name of the regional coordinator (RC) for that region
 +
|-
 +
| <code><nowiki>{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|arc1}}</nowiki></code>
 +
| The name of the assistant regional coordinator (ARC) for that region. Substitute arc2, arc3, or arc4 to obtain the other members if they exist. They return a null value if they are not present in the RC/Data/Core dataset.
 +
|}
 +
 
 +
== Content ==
 +
The content of the page is a lookup table that uses the '''switch''' parser function. The order of the content only serves to make it easier to maintain but does not affect the operation of the template. The names on the left of the '''=''' are what is being looked up and are all case sensitive. Multiple spelling variants can be listed separated by '''|''' as seen with the state lines.
 +
 
 +
Each lookup entry uses the {{tl|RC/Data/Core}} code to select one of many data sets to return. Regions return different data than states.
 +
 
 +
Each region is grouped with the region and the associated states.
 +
<small>{{Pre2|<nowiki>
 +
| Southeast = {{RC/Data/Core|{{{2|}}}|944|JoeUsername|JimUsername|SarahUsername|BettyUsername|JeffUsername|[[AL]]/[[FL]]/[[GA]]|[[Alabama]] / [[Florida]] / [[Georga]]}}
 +
| AL|Alabama = {{RC/Data/Core|{{{2|}}}|213|Southeast}}
 +
| FL|Florida = {{RC/Data/Core|{{{2|}}}|193|Southeast}}
 +
| GA|Georga = {{RC/Data/Core|{{{2|}}}|214|Southeast}}
 +
 
 +
</nowiki>
 +
}}</small>
 +
 
 +
The region lines (Southeast example) can return one regional coordinator and between 0 and 4 assistant regional coordinators' text names, the ID for the regional forum, a short list or long list of states for that region in hyperlink format.
 +
 
 +
The state lines (AL/Alabama example) can return the ID for the state forum or a text name with the region.
 +
 
 +
== Related templates ==
 +
{{RC/TemplateSuite}}
 +
 
 +
 
 +
<includeonly>
 +
<!-- ADD CATEGORIES BELOW THIS LINE -->
 +
[[Category:Templates for or part of the state template]]
 +
 
 +
<!-- ADD INTERWIKIS BELOW THIS LINE -->
 +
 
 +
</includeonly>

Revision as of 19:47, 14 February 2018

This is a documentation subpage for Modèle:RC/Data.
It contains usage information, categories and other content that is not part of the original modèle page.

This template is a part of a suite of subpage templates (listed below) used for the Regional Coordinator table.

This template serves as a lookup table for the Regional and State/Territory forums mainly in the USA. It could be modified to work for other countries, but currently does not.

Usage

This content is used directly and also through the {{RC/Forum}} template.

Examples

Examples for pagename California
Template Result
{{RootPage2}} California
{{RC/Data|{{RootPage2}}|region-name}} <!-- If changes are made to the order of variables, the same change must be made ---- on Template:RC/Data. First variable listed is area-type to then determine ---- which variables can be extracted from then on. ---- ---- province = area-type | province-id | coordinator | arc1 | arc2 | arc3 | arc4 ---- ---- ---- ---- Changes to coordinators should also be changed on Template:RC/Editors ---- (if set up). ---- --><includeonly><!--includeonly here prevents error display on the template page when viewed directly -->{{#switch: {{{1}}} | Alberta = {{RC/Data/Core|{{{2|}}}|province|355|Manoeuvre}} <!----> | British Columbia = {{RC/Data/Core|{{{2|}}}|province|350|Manoeuvre}} <!----> | Manitoba = {{RC/Data/Core|{{{2|}}}|region|348|Manoeuvre}} <!----> | New Brunswick = {{RC/Data/Core|{{{2|}}}|province|346|Manoeuvre}} <!----> | Newfoundland-Labrador = {{RC/Data/Core|{{{2|}}}|region|357|Manoeuvre}} <!----> | Nova Scotia = {{RC/Data/Core|{{{2|}}}|region|344|Manoeuvre}} <!----> | Ontario = {{RC/Data/Core|{{{2|}}}|region|339|Manoeuvre}} <!----> | PEI = {{RC/Data/Core|{{{2|}}}|region|351|Manoeuvre}} <!----> | Quebec = {{RC/Data/Core|{{{2|}}}|region|342|Manoeuvre}} <!----> | Saskatchewan = {{RC/Data/Core|{{{2|}}}|region|353|Manoeuvre}} <!----> <!-- Other territories need to be added --> <!----> <!-- This below is for the CommonProvince template pages when viewed directly --> | Testing|RC|CommonRegion|RC/CommonRegion = {{RC/Data/Core|{{{2|}}}|province|192|UserName1|UserName2|UserName3|UserName4|UserName5|[[XX]]/[[YY]]|[[XXXX]] / [[YYYY]]}} | TestProvince|Canada|CommonProvince|Intro|Forum|Canada/CommonProvince = {{RC/Data/Core|{{{2|}}}|province|192|Testing}} <!----> <!-- Default Canada forum; doesn't work perfectly for all combos, but can show errors --> | {{RC/Data/Core|{{{2|}}}|province|57|Canada}}<!-- default Province forum--> }}</includeonly><noinclude>{{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude>
{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|state-list}} <!-- If changes are made to the order of variables, the same change must be made ---- on Template:RC/Data. First variable listed is area-type to then determine ---- which variables can be extracted from then on. ---- ---- province = area-type | province-id | coordinator | arc1 | arc2 | arc3 | arc4 ---- ---- ---- ---- Changes to coordinators should also be changed on Template:RC/Editors ---- (if set up). ---- --><includeonly><!--includeonly here prevents error display on the template page when viewed directly -->{{#switch: {{{1}}} | Alberta = {{RC/Data/Core|{{{2|}}}|province|355|Manoeuvre}} <!----> | British Columbia = {{RC/Data/Core|{{{2|}}}|province|350|Manoeuvre}} <!----> | Manitoba = {{RC/Data/Core|{{{2|}}}|region|348|Manoeuvre}} <!----> | New Brunswick = {{RC/Data/Core|{{{2|}}}|province|346|Manoeuvre}} <!----> | Newfoundland-Labrador = {{RC/Data/Core|{{{2|}}}|region|357|Manoeuvre}} <!----> | Nova Scotia = {{RC/Data/Core|{{{2|}}}|region|344|Manoeuvre}} <!----> | Ontario = {{RC/Data/Core|{{{2|}}}|region|339|Manoeuvre}} <!----> | PEI = {{RC/Data/Core|{{{2|}}}|region|351|Manoeuvre}} <!----> | Quebec = {{RC/Data/Core|{{{2|}}}|region|342|Manoeuvre}} <!----> | Saskatchewan = {{RC/Data/Core|{{{2|}}}|region|353|Manoeuvre}} <!----> <!-- Other territories need to be added --> <!----> <!-- This below is for the CommonProvince template pages when viewed directly --> | Testing|RC|CommonRegion|RC/CommonRegion = {{RC/Data/Core|{{{2|}}}|province|192|UserName1|UserName2|UserName3|UserName4|UserName5|[[XX]]/[[YY]]|[[XXXX]] / [[YYYY]]}} | TestProvince|Canada|CommonProvince|Intro|Forum|Canada/CommonProvince = {{RC/Data/Core|{{{2|}}}|province|192|Testing}} <!----> <!-- Default Canada forum; doesn't work perfectly for all combos, but can show errors --> | {{RC/Data/Core|{{{2|}}}|province|57|Canada}}<!-- default Province forum--> }}</includeonly><noinclude>{{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude>
{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|state-list-long}} <!-- If changes are made to the order of variables, the same change must be made ---- on Template:RC/Data. First variable listed is area-type to then determine ---- which variables can be extracted from then on. ---- ---- province = area-type | province-id | coordinator | arc1 | arc2 | arc3 | arc4 ---- ---- ---- ---- Changes to coordinators should also be changed on Template:RC/Editors ---- (if set up). ---- --><includeonly><!--includeonly here prevents error display on the template page when viewed directly -->{{#switch: {{{1}}} | Alberta = {{RC/Data/Core|{{{2|}}}|province|355|Manoeuvre}} <!----> | British Columbia = {{RC/Data/Core|{{{2|}}}|province|350|Manoeuvre}} <!----> | Manitoba = {{RC/Data/Core|{{{2|}}}|region|348|Manoeuvre}} <!----> | New Brunswick = {{RC/Data/Core|{{{2|}}}|province|346|Manoeuvre}} <!----> | Newfoundland-Labrador = {{RC/Data/Core|{{{2|}}}|region|357|Manoeuvre}} <!----> | Nova Scotia = {{RC/Data/Core|{{{2|}}}|region|344|Manoeuvre}} <!----> | Ontario = {{RC/Data/Core|{{{2|}}}|region|339|Manoeuvre}} <!----> | PEI = {{RC/Data/Core|{{{2|}}}|region|351|Manoeuvre}} <!----> | Quebec = {{RC/Data/Core|{{{2|}}}|region|342|Manoeuvre}} <!----> | Saskatchewan = {{RC/Data/Core|{{{2|}}}|region|353|Manoeuvre}} <!----> <!-- Other territories need to be added --> <!----> <!-- This below is for the CommonProvince template pages when viewed directly --> | Testing|RC|CommonRegion|RC/CommonRegion = {{RC/Data/Core|{{{2|}}}|province|192|UserName1|UserName2|UserName3|UserName4|UserName5|[[XX]]/[[YY]]|[[XXXX]] / [[YYYY]]}} | TestProvince|Canada|CommonProvince|Intro|Forum|Canada/CommonProvince = {{RC/Data/Core|{{{2|}}}|province|192|Testing}} <!----> <!-- Default Canada forum; doesn't work perfectly for all combos, but can show errors --> | {{RC/Data/Core|{{{2|}}}|province|57|Canada}}<!-- default Province forum--> }}</includeonly><noinclude>{{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude>
{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|regional-coordinator}} The name of the regional coordinator (RC) for that region
{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|arc1}} The name of the assistant regional coordinator (ARC) for that region. Substitute arc2, arc3, or arc4 to obtain the other members if they exist. They return a null value if they are not present in the RC/Data/Core dataset.

Content

The content of the page is a lookup table that uses the switch parser function. The order of the content only serves to make it easier to maintain but does not affect the operation of the template. The names on the left of the = are what is being looked up and are all case sensitive. Multiple spelling variants can be listed separated by | as seen with the state lines.

Each lookup entry uses the {{RC/Data/Core}} code to select one of many data sets to return. Regions return different data than states.

Each region is grouped with the region and the associated states.

| Southeast = {{RC/Data/Core|{{{2|}}}|944|JoeUsername|JimUsername|SarahUsername|BettyUsername|JeffUsername|[[AL]]/[[FL]]/[[GA]]|[[Alabama]] / [[Florida]] / [[Georga]]}}
| AL|Alabama = {{RC/Data/Core|{{{2|}}}|213|Southeast}}
| FL|Florida = {{RC/Data/Core|{{{2|}}}|193|Southeast}}
| GA|Georga = {{RC/Data/Core|{{{2|}}}|214|Southeast}}

The region lines (Southeast example) can return one regional coordinator and between 0 and 4 assistant regional coordinators' text names, the ID for the regional forum, a short list or long list of states for that region in hyperlink format.

The state lines (AL/Alabama example) can return the ID for the state forum or a text name with the region.

Related templates

This template suite also uses the following templates:

  • {{RC/Canada}} - Link to Canadian Wiki page and forum
  • {{RC/Province}} - Link to Province Wiki page and forum
  • {{RC/CommonProvince}} - Default content for provincial pages if not already created
  • {{RC/Forum}} - Generates HTML link based on Province name and requested data
  • {{RC/Data}} - The database holding all the coordinator related data
  • {{RC/Data/Core}} - The translation of text for parameters to the {{RC/Data}} content
  • {{RC/TableRow}} - Generates the main content for the RC table
  • {{Username|NAME_OF_USER}} to create user page and PM links.
  • {{PM|NAME_OF_USER}} to create PM links.