Difference between revisions of "Template:Chapter"
Dinoguy1000 (talk | contribs) (add support for Strongest Duelist Yuya and Cyber Warrior Yusaku) |
Dinoguy1000 (talk | contribs) (update) |
||
Line 7: | Line 7: | ||
| {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | team }} | D Team ZEXAL | | {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | team }} | D Team ZEXAL | ||
| {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | zexal }} | ZEXAL | | {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | zexal }} | ZEXAL | ||
− | | {{ #if: {{ #pos: {{ #var: $template: | + | | {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | yuya }} | ARC-V The Strongest Duelist Yuya!! |
| {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | arc }} | ARC-V | | {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | arc }} | ARC-V | ||
| {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | yusaku }} | VRAINS: Cyber Warrior Yusaku | | {{ #if: {{ #pos: {{ #var: $template:chapter-release }} | yusaku }} | VRAINS: Cyber Warrior Yusaku | ||
Line 21: | Line 21: | ||
}} | }} | ||
}} | }} | ||
− | |||
}}{{ #vardefine: $template:chapter-chapter-name | {{ #switch: {{ #var: $template:chapter-release }} | }}{{ #vardefine: $template:chapter-chapter-name | {{ #switch: {{ #var: $template:chapter-release }} | ||
| <!-- Yu-Gi-Oh! --> | Duelist | Millennium World = Duel | | <!-- Yu-Gi-Oh! --> | Duelist | Millennium World = Duel | ||
Line 31: | Line 30: | ||
}} | }} | ||
}}{{ #vardefine: $template:chapter-number | {{{2}}} | }}{{ #vardefine: $template:chapter-number | {{{2}}} | ||
− | }}{{ #vardefine: $template:chapter-query | [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[{{ #var: $template:chapter- | + | }}{{ #vardefine: $template:chapter-subseries | {{ #switch: {{ #var: $template:chapter-release }}<!-- backcompat --> |
+ | | Duelist = {{ #ifexpr: {{ #var: $template:chapter-number }} < 60 | subseries | {{ #ifexpr: {{ #var: $template:chapter-number }} > 118 || subseries }} }} | ||
+ | | Millennium World = {{ #ifexpr: {{ #var: $template:chapter-number }} < 100 | subseries | }} | ||
+ | }} | ||
+ | }}{{ #vardefine: $template:chapter-subseries | {{ #if: {{ #var: $template:chapter-subseries }} | Chapter subseries number | Chapter number }} | ||
+ | }}{{ #vardefine: $template:chapter-query | [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[{{ #var: $template:chapter-subseries }}::{{ #var: $template:chapter-number }}]] | ||
}}<span class="citation">{{ #if: {{ #if: {{IfSemantics}} | {{ #if: {{ #ask: {{ #var: $template:chapter-query }} }} | 1 }} }} | }}<span class="citation">{{ #if: {{ #if: {{IfSemantics}} | {{ #if: {{ #ask: {{ #var: $template:chapter-query }} }} | 1 }} }} | ||
| {{ #ifeq: {{ lc: {{{3}}} }} | ref | ''Yu-Gi-Oh! {{ #var: $template:chapter-release }}'' {{ #var: $template:chapter-chapter-name }} {{ #var: $template:chapter-number }}: }} {{ #switch: {{ lc: {{{3}}} }} | | {{ #ifeq: {{ lc: {{{3}}} }} | ref | ''Yu-Gi-Oh! {{ #var: $template:chapter-release }}'' {{ #var: $template:chapter-chapter-name }} {{ #var: $template:chapter-number }}: }} {{ #switch: {{ lc: {{{3}}} }} | ||
− | | number = {{ #ask: {{ #var: $template:chapter-query }} |? | + | | number = {{ #ask: {{ #var: $template:chapter-query }} |?Chapter number | link=none | format=template | template=PipeLink }} |
− | | numbers = {{ #ask: {{ #var: $template:chapter-query }} |? | + | | numbers = {{ #ask: {{ #var: $template:chapter-query }} |?Chapter subseries number |?Chapter number | link=none | format=template | template=Chapter/numbers }} |
− | | #default = "{{ #ask: {{ #var: $template:chapter-query }} |?Translated Japanese | + | | #default = "{{ #ask: {{ #var: $template:chapter-query }} |?Translated Japanese name |?English name | link=none | format=template | template=PipeLink }}" |
}} | }} | ||
| [[Yu-Gi-Oh! {{ #var: $template:chapter-release }} - {{ #var: $template:chapter-chapter-name }} {{ padleft: {{ #var: $template:chapter-number }} | 3 }}|{{ #switch: {{ lc: {{{3}}} }} | | [[Yu-Gi-Oh! {{ #var: $template:chapter-release }} - {{ #var: $template:chapter-chapter-name }} {{ padleft: {{ #var: $template:chapter-number }} | 3 }}|{{ #switch: {{ lc: {{{3}}} }} |
Revision as of 21:55, 16 January 2019
{{chapter}}
is used to create pre-formatted links to articles on manga chapters.
In the event that the extension Semantic MediaWiki gets disabled, this template has fallback outputs that are different than desired, but don't contain broken code.
Usage
{{chapter|series name|chapter number}}
This is used to provided the name of the chapter, linked to its article.
{{chapter|series name|chapter number|ref}}
This will produce the name of the chapter in reference format, including a link to its article.
{{chapter|series name|chapter number|ref|page=page number}}
This can be used to add the page number to the ref format.
{{chapter|series name|chapter number|number}}
This will produce the number of the chapter, linked to its article.
Examples
Input | Output |
---|---|
{{chapter|Yu-Gi-Oh!|1}} | "The Puzzle of the Gods" |
{{chapter|Yu-Gi-Oh!|1|ref}} | Yu-Gi-Oh! Duel 1: "The Puzzle of the Gods" |
{{chapter|Yu-Gi-Oh!|1|ref|page=5}} | Yu-Gi-Oh! Duel 1: "The Puzzle of the Gods"; page 5 |
{{chapter|Yu-Gi-Oh!|1|number}} | 001 |
Subseries | |
{{chapter|Yu-Gi-Oh!|60|ref}} | Yu-Gi-Oh! Duel 60 (Duelist Duel 1): "Challenge!!" |
{{chapter|Yu-Gi-Oh! Duelist|1|ref}} | Yu-Gi-Oh! Duel 60 (Duelist Duel 1): "Challenge!!" |
{{chapter|Yu-Gi-Oh!|300|ref}} | Yu-Gi-Oh! Duel 300 (Millennium World Duel 22): "Slifer vs. Diabound" |
{{chapter|Yu-Gi-Oh! Millennium World|22|ref}} | Yu-Gi-Oh! Duel 300 (Millennium World Duel 22): "Slifer vs. Diabound" |
Arcs | |
{{chapter|Yu-Gi-Oh! OCG Stories|Sky Striker Ace|1}} | "Sky Striker" |
{{chapter|Yu-Gi-Oh! OCG Stories|Magistus|1|ref}} | Yu-Gi-Oh! OCG Stories Magistus arc chapter 1: "Magistus" |
Special chapters | |
{{chapter|Summon The Dark Ruler!!|ref}} | Yu-Gi-Oh! R Special Duel: "Summon The Dark Ruler!!" |
{{chapter|Yu-Gi-Oh! GX - Chapter SP1|ref}} | Yu-Gi-Oh! GX "Special One-Shot" |
{{chapter|Yu-Gi-Oh! 5D's - Ride SP1|ref}} | Yu-Gi-Oh! 5D's Special Side Story Part 1: "The Duel Emperor Finals!!" |
{{chapter|TRANSCEND GAME (part 2)|ref}} | Yu-Gi-Oh! "TRANSCEND GAME (part 2)" |
{{chapter|Let's Do It! Rush Duel!!|ref}} | Yu-Gi-Oh! SEVENS "Let's Do It! Rush Duel!!" |