Difference between revisions of "Creditstable"
From Sega Retro
Line 7: | Line 7: | ||
| {{#ifexpr:{{#len:{{#var:currentLine}}}} > 3|true|}} | | {{#ifexpr:{{#len:{{#var:currentLine}}}} > 3|true|}} | ||
| {{#vardefine:currentLine|{{#explode:{{#var:allLines}}|*|{{#var:i}}}}}}{{incvar|i}} | | {{#vardefine:currentLine|{{#explode:{{#var:allLines}}|*|{{#var:i}}}}}}{{incvar|i}} | ||
− | + | ||
{{#if:{{#pos:{{#var:currentLine}}|<}}|{{#vardefine:currentLine2|{{#explode:{{#var:currentLine}}|<|0}}{{#explode:{{#var:currentLine}}|>|-1}}}}|{{#vardefine:currentLine2|{{#var:currentLine}}}}}} | {{#if:{{#pos:{{#var:currentLine}}|<}}|{{#vardefine:currentLine2|{{#explode:{{#var:currentLine}}|<|0}}{{#explode:{{#var:currentLine}}|>|-1}}}}|{{#vardefine:currentLine2|{{#var:currentLine}}}}}} | ||
{{#vardefine:currentRole|{{#explode:{{#var:currentLine2}}|:|0}}}}{{#vardefine:currentNames|{{#explode:{{#var:currentLine2}}|:|1}}}} | {{#vardefine:currentRole|{{#explode:{{#var:currentLine2}}|:|0}}}}{{#vardefine:currentNames|{{#explode:{{#var:currentLine2}}|:|1}}}} | ||
+ | {{#vardefine:currentNames|{{#replace:{{#var:currentNames}}| & |, }}}}{{#vardefine:currentNames|{{#replace:{{#var:currentNames}}| and |, }}}} | ||
{{#ifexpr:{{#len:{{#var:currentNames}}}} > 0| | {{#ifexpr:{{#len:{{#var:currentNames}}}} > 0| | ||
{{StoreCreditsLine|role={{#var:currentRole}}|nameList={{#var:currentNames}}|game={{PAGENAME}}|console={{{console|}}}|date={{{date|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}}} | {{StoreCreditsLine|role={{#var:currentRole}}|nameList={{#var:currentNames}}|game={{PAGENAME}}|console={{{console|}}}|date={{{date|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}}} |
Revision as of 15:04, 14 November 2017
This template defines the table "credits". View table.
Usage
Example
{{creditstable| {{creditsheader|Header}} * '''Role 1:''' Name * '''Role 2:''' Name |source=In-game credits |console=MD |pdf=GamePro US 001.pdf |pdfpage=10 }}
Header
- Role 1: Name
- Role 2: Name
- Source: In-game credits