Difference between revisions of "Template:Chapter"
Dinoguy1000 (talk | contribs) (really, there's not much reason to limit {{{page}}}/{{{4}}} to when the mode is "ref") |
(If the series is "Yu-Gi-Oh!", use the "Japanese chapter number" property, so both the original numbering and Duelist/Millennium World numbering work.) |
||
Line 17: | Line 17: | ||
}} | }} | ||
}} | }} | ||
+ | }}{{ #vardefine: $template:chapter-number-property | {{ #ifeq: {{ lc: {{{1}}} }} | yu-gi-oh! | Japanese | English }} chapter number | ||
}}{{ #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 26: | Line 27: | ||
}} | }} | ||
}}{{ #vardefine: $template:chapter-number | {{{2}}} | }}{{ #vardefine: $template:chapter-number | {{{2}}} | ||
− | }}<span class="citation">{{ #if: {{ #if: {{IfSemantics}} | {{ #if: {{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[ | + | }}<span class="citation">{{ #if: {{ #if: {{IfSemantics}} | {{ #if: {{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[{{ #var: $template:chapter-number-property }}::{{ #var: $template:chapter-number }}]] }} | 1 }} }} |
| {{ #switch: {{ lc: {{{3}}} }} | | {{ #switch: {{ lc: {{{3}}} }} | ||
− | | ref = <cite>Yu-Gi-Oh! {{ #var: $template:chapter-release }}</cite> {{ #var: $template:chapter-chapter-name }} {{ #var: $template:chapter-number }}: "{{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[ | + | | ref = <cite>Yu-Gi-Oh! {{ #var: $template:chapter-release }}</cite> {{ #var: $template:chapter-chapter-name }} {{ #var: $template:chapter-number }}: "{{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[{{ #var: $template:chapter-number-property }}::{{ #var: $template:chapter-number }}]] |?Translated Japanese chapter name |?English chapter name | link=none | format=template | template=PipeLink }}" |
− | | number = {{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[ | + | | number = {{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[{{ #var: $template:chapter-number-property }}::{{ #var: $template:chapter-number }}]] |?{{ #var: $template:chapter-number-property }} |link=none |format=template |template=PipeLink }} |
− | | numbers = {{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[ | + | | numbers = {{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[{{ #var: $template:chapter-number-property }}::{{ #var: $template:chapter-number }}]] |?English chapter number |?Japanese chapter number |link=none |format=template |template=Chapter/numbers }} |
− | | #default = "{{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[ | + | | #default = "{{ #ask: [[Chapter series::Yu-Gi-Oh! {{ #var: $template:chapter-release }}]][[{{ #var: $template:chapter-number-property }}::{{ #var: $template:chapter-number }}]] |?Translated Japanese chapter name |?English chapter 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 19:08, 6 October 2016
{{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!!" |