Difference between revisions of "Template:HonorLanding"

From Pathfinder Wiki
(fix master2 category)
(add support for pilots)
(32 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>
+
<noinclude>{{#cargo_declare:
 +
_table=Honors
 +
|honorname  = String (mandatory; unique)
 +
|category    = String
 +
|year        = Integer
 +
|authority  = String
 +
|skill      = Integer
 +
|insignia    = File
 +
|category    = String
 +
|field_trip  = String (allowed values=required, optional)
 +
|instructor  = String (allowed values=licensed, certified, skilled, qualified)
 +
|state      = String (allowed values=piloting, released)
 +
}}
 +
 
 
{{HonorLanding
 
{{HonorLanding
 
|honorname=Aboriginal Lore
 
|honorname=Aboriginal Lore
Line 9: Line 22:
 
|insignia_source=test
 
|insignia_source=test
 
}}
 
}}
</noinclude><includeonly><onlyinclude><languages />__NOTOC__{{#vardefine:localHonorname|{{GetHonorLandingPage}}}}{{#vardefine:translatedHonorname|{{GetHonorName|page={{#var:localHonorname}}}}}}
+
</noinclude><includeonly><onlyinclude><languages />__NOTOC__{{#vardefine:localHonorname|{{GetHonorLandingPage|honor={{{honorname|}}}}}}}{{#vardefine:translatedHonorname|{{GetHonorName|page={{#var:localHonorname}}{{GetLangSuffix}}}}}}
{{HonorPrintHeader|category={{{category|}}}|skill={{{skill|}}}|authority={{{authority|}}}|year={{{year|}}}|insignia={{{insignia|}}}}}
+
{{HonorPrintHeader
 +
|category={{{category|}}}
 +
|skill={{{skill|}}}
 +
|authority={{{authority|}}}
 +
|year={{{year|}}}  
 +
|insignia={{{insignia|}}}
 +
|state={{{state|}}}
 +
}}{{#ifeq:Template:HonorLanding|{{NAMESPACE}}:{{BASEPAGENAME}}||{{#invoke:HonorTitle|setDisplayTitle|customLandingPage={{#var:localHonorname}}|state={{{state|}}}}}}}{{#forargs:answerKey_
 +
| key
 +
| value
 +
|<nowiki />{{#vardefine:answerKey_{{#var: key }}|{{#var:value}}}}
 +
}}{{#forargs:requirements_
 +
| key
 +
| value
 +
|<nowiki />{{#vardefine:requirements_{{#var: key }}|{{#var:value}}}}
 +
}}{{#vardefine:cnt_answerKey_variants|{{{cnt_answerKey_variants|0}}}}}{{#vardefine:cnt_requirements_variants|{{{cnt_requirements_variants|0}}}}}
 
<div class="container mw-parser-output">
 
<div class="container mw-parser-output">
 
<div class="row">
 
<div class="row">
<div class="col-md-3 order-md-last">
+
<div class="col-md-4 order-md-last mb-3 mb-md-0 noprint">
<div style="position: sticky; top: calc(80px + 1em);">{{Honor_infobox
+
<div style="position: sticky; top: calc(80px + 1em);">{{#if:{{GetLangSuffix}}||{{#cargo_store:
 +
_table=Honors
 +
|honorname  = {{{honorname|{{#titleparts:{{PAGENAME}}|1|2}}}}}
 +
|year        = {{{year|}}}
 +
|authority  = {{{authority|}}}
 +
|skill      = {{{skill|}}}
 +
|insignia    = {{{insignia|}}}
 +
|category    = {{{category|}}}
 +
|field_trip  = {{{field_trip|}}}
 +
|instructor  = {{{instructor|}}}
 +
|state      = {{{state|released}}}
 +
}}}}{{Honor_infobox
 +
|honorlandingpage={{#var:localHonorname}}
 
|skill={{{skill|}}}
 
|skill={{{skill|}}}
 
|year={{{year|}}}
 
|year={{{year|}}}
Line 26: Line 66:
 
|master2={{{master2|}}}
 
|master2={{{master2|}}}
 
|advanced={{#var:advanced}}
 
|advanced={{#var:advanced}}
 +
|state={{{state|}}}
 +
|pilotAuthor={{{pilotAuthor|}}}
 
}}
 
}}
 
</div><!--close sticky container-->
 
</div><!--close sticky container-->
 
</div><!--close column-->
 
</div><!--close column-->
<div class="col-md-9">
+
<div class="col-md-8 col-print-12">
{{HonorTabs|answer_variants={{{answer_variants|}}}}}
+
{{#invoke:HonorTabs|generateHonorTabs}}
<div class="tab-content" id="myTabContent">
+
<div class="tab-content" id="myTabContent">{{#ifeq:{{{state|}}}|piloting
<!--
+
|{{Template:Piloting Honor Info}}}}<!--
If {{NAMESPACE}} is defined the template has not been invoked from the Main namespace, so we can just add the template to [[Category:Honor templates]]. Otherwise, we add the page to any of many various categories as per the parameters.
+
If {{NAMESPACE}} is defined the template has not been invoked from the Main namespace, so we can just add the template to [[Category:Honor templates]]. Otherwise, we add the page to any of many various categories as per the parameters.
 
-->{{#if:{{NAMESPACE}}|[[Category:Honor templates]]
 
-->{{#if:{{NAMESPACE}}|[[Category:Honor templates]]
 
|{{#ifexist:{{#titleparts:{{PAGENAME}}|2|1}} - Advanced|[[Category:AY Honors/Honors with an Advanced Option{{GetLangSuffix}}|{{#var:translatedHonorname}}]]}}{{#if:{{{insignia|}}}
 
|{{#ifexist:{{#titleparts:{{PAGENAME}}|2|1}} - Advanced|[[Category:AY Honors/Honors with an Advanced Option{{GetLangSuffix}}|{{#var:translatedHonorname}}]]}}{{#if:{{{insignia|}}}
| {{#ifeq:{{{insignia}}}|{{Localize|No Patch}}
+
| {{#ifeq:{{{insignia}}}|{{Localize|No Patch|Images}}
 
|    [[Category:No insignia image{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
|    [[Category:No insignia image{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
|    [[Category:Has insignia image{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
|    [[Category:Has insignia image{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
Line 45: Line 87:
 
|  Outdoor Industries =[[Category:AY Honors/Farming Master Award{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
|  Outdoor Industries =[[Category:AY Honors/Farming Master Award{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
|  Household Arts =[[Category:AY Honors/Homemaking Master Award{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
|  Household Arts =[[Category:AY Honors/Homemaking Master Award{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
|  Vocational =[[Category:AY Honors/Technician Master Award{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
 
|  ADRA =[[Category:AY Honors/ADRA Master Award/ADRA{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/ADRA Master Award{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
|  ADRA =[[Category:AY Honors/ADRA Master Award/ADRA{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/ADRA Master Award{{GetLangSuffix}}|{{#var:translatedHonorname}}]]
 
}}{{#if:{{{complete_course|}}}|[[Category:AY Honors/Complete a Course{{GetLangSuffix}}|{{SUBPAGENAME}}]]}}{{#if:{{{primary|}}}|[[Category:AY Honors/Secondary|{{#var:translatedHonorname}}]]
 
}}{{#if:{{{complete_course|}}}|[[Category:AY Honors/Complete a Course{{GetLangSuffix}}|{{SUBPAGENAME}}]]}}{{#if:{{{primary|}}}|[[Category:AY Honors/Secondary|{{#var:translatedHonorname}}]]
Line 54: Line 95:
 
}}{{#if:{{{master1|}}}|[[Category:AY Honors/{{{master1}}} Master Award{{#if:{{{master_group1|}}}|/{{{master_group1}}}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]]}}
 
}}{{#if:{{{master1|}}}|[[Category:AY Honors/{{{master1}}} Master Award{{#if:{{{master_group1|}}}|/{{{master_group1}}}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]]}}
 
{{#if:{{{master2|}}}|[[Category:AY Honors/{{{master2}}} Master Award{{#if:{{{master_group2|}}}|/{{{master_group2}}}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]]}}
 
{{#if:{{{master2|}}}|[[Category:AY Honors/{{{master2}}} Master Award{{#if:{{{master_group2|}}}|/{{{master_group2}}}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]]}}
[[Category:AY Honors/HonorLanding{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/{{{category}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/Introduced in {{{year|Unknown}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/Skill Level {{{skill|Unknown}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/Approved by {{{authority|Unknown}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]]{{AddRomanToSeeAlso}}}}[[Category:Uses HonorLanding Template]]
+
[[Category:AY Honors/HonorLanding{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honor Categories/{{{category}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/{{{category}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/Introduced in {{{year|Unknown}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/Skill Level {{{skill|Unknown}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]][[Category:AY Honors/Approved by {{{authority|Unknown}}}{{GetLangSuffix}}|{{#var:translatedHonorname}}]]{{AddRomanToSeeAlso}}}}[[Category:Uses HonorLanding Template]]{{#ifexpr: {{{cnt_requirements_variants|0}}} > 1 |[[Category:AY Honor Config/Has Requirement Variants|{{#var:translatedHonorname}}]]}}{{#if:{{{cnt_answerKey_variants|}}}|[[Category:AY Honor Config/Has Answer Key Variants|{{#var:translatedHonorname}}]]}}{{#if:{{{cnt_crosslinkhonors|}}}|[[Category:AY Honor Config/Has Crosslink Honors|{{#var:translatedHonorname}}]]}}{{#ifeq:{{{state}}}|piloting|[[Category:AY Honors/Piloting{{GetLangSuffix}}|{{#translatedHonorname}}]]}}{{#if:{{{debug|}}}|
</onlyinclude></includeonly>
+
*translatedHonorname:{{#var:translatedHonorname}}
 +
*localHonorname:{{#var:localHonorname}}
 +
}}</onlyinclude></includeonly>
 
<noinclude>
 
<noinclude>
 
<templatedata>
 
<templatedata>

Revision as of 15:43, 3 April 2022

This template defines the table "Honors". View table.


Skill Level

1

Year

2006

Version

28.03.2024

Approval authority

General Conference

[[File:|200px]]
Aboriginal Lore
Arts, Crafts and Hobbies
Skill Level
123
Approval authority
General Conference
Year of Introduction
2006
See also


This template captures an honor's metadata and formats its landing page including the honor infobox and the honor navigation tabs.

Example:

{{HonorLanding

|honorname=Aboriginal Lore

|skill=1

|year=2006

|category=Arts, Crafts and Hobbies

|authority=General Conference

|insignia=Aboriginallore.png

|insignia_source=test

}}

Template parameters

ParameterDescriptionTypeStatus
Honornamehonorname

Name of the honor as it should be displayed at the top of the infobox.

Example
Aboriginal Lore
Stringoptional
Skill levelskill

Skill level of the honor (1, 2, or 3)

Example
1
Unknownoptional
Year of introductionyear

The year the honor was introduced

Example
2006
Numberoptional
Honor Categorycategory

Category to which the honor belongs.

Example
Arts, Crafts and Hobbies
Stringoptional
Approval Authorityauthority

The highest level organization in the church which has approved the honor.

Example
General Conference
Stringoptional
Honor insigniainsignia

Filename for the patch's image. If specified, the honor will be placed in [[:Category:Has insignia image]]. If omitted or if set to No_patch.png, the honor will be placed in [[:Category:No insignia image]].

Example
Aboriginallore.png
Fileoptional
Source of honor insigniainsignia_source

If the insignia is not carried by Advent''Source'', this variable will indicate where it can be obtained. If set, it will also superimpose a "Not available at Advent''Source''" warning across the insignia image. We are required to splash this warning by the NAD (our host).

Example
test
Stringoptional
Field trip neededfield_trip

This field can be set to "required" or "optional". If the honor cannot be earned without a field trip, set it to "required". If one of the requirements can be met by taking a field trip, set it to "optional". If no field trip is mentioned in the requirements, this parameter should be omitted.

Stringoptional
Instructorinstructor

If an instructor is required, define this to any non-blank text. If the value specified is ''licensed, certified, skilled,'' or ''qualfied'', the honor will be added to [[:Category:Instructor Required/Licensed]], [[:Category:Instructor Required/Skilled]], or [[:Category:Instructor Required/Qualified]]. All honors that have this field set to anything (including the special values listed above) will be added to [[:Category:Instructor Required]].

Stringoptional
Master 1master1

If the honor is a component of a Master Award, the value assigned to master1 should indicate which award that is. If it's part of two Master Awards, master2 can be used to assign it to a second one. If the honor is part of a Master Award by virtue of being in a broad honor category (such as Arts, Crafts and Hobbies), this parameter should not be used to specify the Master Award since the {{{category}}} parameter will already have that information.

Unknownoptional
Master 2master2

If the honor is a component of a Master Award, the value assigned to master1 should indicate which award that is. If it's part of two Master Awards, master2 can be used to assign it to a second one. If the honor is part of a Master Award by virtue of being in a broad honor category (such as Arts, Crafts and Hobbies), this parameter should not be used to specify the Master Award since the {{{category}}} parameter will already have that information.

Unknownoptional
Primary honorprimary

If this honor has variants depending on where it is taught (because the answer key is different, or because the requirements are different), this argument should indicate which page is the primary version of the honor. Because the wiki is hosted by the NAD, any NAD variant will be considered primary. Otherwise, the primary version will be the highest authority level. If left blank, this variant of the honor will be considered the primary version. If set, this variant will be marked as secondary and it will not show up in the main indices. Do not add this parameter to the honor that is the primary variant - add it to the ones that are not primary.

Stringoptional
Master (Group 1)master_group1

Some Master Awards (such as Naturalist) are set up to require the Pathfinder to earn N honors from one List, and M from another (where N+M usually equals 7). If this honor belongs to one of those groups, add this parameter to identify the sub-group. This parameter will be ignored unless master1 (or master2) is filled in.

Unknownoptional
Master (Group2)master_group2

Some Master Awards (such as Naturalist) are set up to require the Pathfinder to earn N honors from one List, and M from another (where N+M usually equals 7). If this honor belongs to one of those groups, add this parameter to identify the sub-group. This parameter will be ignored unless master1 (or master2) is filled in.

Unknownoptional