Template:RC/Data/doc View history

No edit summary
(→‎Content: removed extra space)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{doc subpage}}
{{doc subpage}}
<!-- ADD DOCUMENTATION BELOW THIS LINE -->
<!-- ADD DOCUMENTATION BELOW THIS LINE -->
This template is a part of a suite of subpage templates (listed below) used for the [[Regional Coordinator/USA]] table.
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.
This template also serves as a lookup table for the Regional and State/Territory forums in the USA.


== Usage ==
== Usage ==
This content is used directly and also through the {{tl|RC/Forum}} template.
This content is used directly and also through the {{tl|RC/Forum}} template.
 
The first parameter sent to the template is the name of the region or state as defined in the {{tlc|RC/Data}} for which data is being requested. The second parameter sent to the template is the element name being requested from the dataset in {{tlc|RC/Data}}.
 
The template is commonly used within itself when starting with only a State pagename, but information about the region is desired. The examples below illustrate this use.


== Examples ==
== Examples ==
{| class="wikitable"
{| class="wikitable"
|+ Examples for pagename California
|+ Examples for pagename California
! Template
! Template Example
! Result
! Result
|-
|-
Line 17: Line 21:
| California
| California
|-
|-
| {{tl|RC/Data|<nowiki>{{RootPage2}}</nowiki>|region-name}}
| {{tlx|RC/Data|<nowiki>{{RootPage2}}</nowiki>|region-name}}
| {{RC/Data|CA|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>
| <code><nowiki>{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|state-list-long}}</nowiki></code>
| {{RC/Data|{{RC/Data|CA|region-name}}|state-list-long}}
| {{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 ==
== 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.
The content of the page is a lookup table that uses the '''switch''' parser function. The '''row''' order of the content only serves to make it easier to maintain but does not affect the operation of the template. However, the order within each row is dependent upon location to operate properly. 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 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.
Each region is grouped with the associated states to that region to simplify updates, but they do not matter what row they are added.
<small>{{Pre2|<nowiki>
<small>{{Pre2|<nowiki>
| Southeast = {{RC/Data/Core|{{{2|}}}|944|JoeUsername|JimUsername|[[AL]]/[[FL]]/[[GA]]|[[Alabama]] / [[Florida]] / [[Georga]]}}
| 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}}
| AL|Alabama = {{RC/Data/Core|{{{2|}}}|213|Southeast}}
| FL|Florida = {{RC/Data/Core|{{{2|}}}|193|Southeast}}
| FL|Florida = {{RC/Data/Core|{{{2|}}}|193|Southeast}}
| GA|Georga = {{RC/Data/Core|{{{2|}}}|214|Southeast}}
| GA|Georga = {{RC/Data/Core|{{{2|}}}|214|Southeast}}
</nowiki>
</nowiki>
}}</small>
}}</small>


The region lines (Southeast example) can return one of two 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 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.
The state lines (AL/Alabama example) can return the ID for the state forum or a text name with the region.
== Possible error results ==
The template is softly coded to simplify data entry and management, so because of the two different data types mixed together, you can get false return data if you ask for a Regional Coordinator with a State name request and not a Region name request.


== Related templates ==
== Related templates ==
Line 51: Line 64:
<includeonly>
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Templates for or part of the state template]]


<!-- ADD INTERWIKIS BELOW THIS LINE -->
<!-- ADD INTERWIKIS BELOW THIS LINE -->


</includeonly>
</includeonly>

Latest revision as of 18:46, 11 August 2022

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

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

This template also serves as a lookup table for the Regional and State/Territory forums in the USA.

Usage

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

The first parameter sent to the template is the name of the region or state as defined in the {{RC/Data}} for which data is being requested. The second parameter sent to the template is the element name being requested from the dataset in {{RC/Data}}.

The template is commonly used within itself when starting with only a State pagename, but information about the region is desired. The examples below illustrate this use.

Examples

Examples for pagename California
Template Example Result
{{RootPage2}} California
{{RC/Data|{{RootPage2}}|region-name}} Southwest
{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|state-list}} AZ/CA/CO/HI/NV/NM/UT
{{RC/Data|{{RC/Data|{{RootPage2}}|region-name}}|state-list-long}} Arizona / California / Colorado / Hawaii / Nevada / New Mexico / Utah
{{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 row order of the content only serves to make it easier to maintain but does not affect the operation of the template. However, the order within each row is dependent upon location to operate properly. 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 associated states to that region to simplify updates, but they do not matter what row they are added.

| 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.

Possible error results

The template is softly coded to simplify data entry and management, so because of the two different data types mixed together, you can get false return data if you ask for a Regional Coordinator with a State name request and not a Region name request.

Related templates

This template suite also uses the following templates:

  • {{RC/USA}} - Link to USA Wiki page and forum
  • {{RC/Region}} - Link to Region Wiki page and forum
  • {{RC/CommonRegion}} - Default content for regional pages if not already created
  • {{RC/Forum}} - Generates HTML link based on Region name and requested data
  • {{RC/Data}} - The database holding all the regional 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.