Template:Event Story: Difference between revisions

From A3! Wiki
mNo edit summary
Tree (talk | contribs)
m On second thought, let's use a more robust/future-proof fix for this; use single quotes in all cases, and use replace function to escape single quotes coming from template parameters
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{Story
<includeonly>{{Story
|troupe={{{troupe|}}}
|troupe={{{troupe|}}}
|text={{#switch: {{{troupe|}}} | masumi | itaru | banri | juza | taichi | omi | azami | tsumugi | tasuku | hisoka | homare | azuma | guy = w | }}
|image={{Replace|Event Story {{{event|}}}.png}}
|image=Event Story {{{event|}}}.png
|title={{{event|}}}{{#cargo_query:tables=Event|fields=IFNULL(CONCAT(' &mdash; ', name_jp),'')=Name|where=name_en='{{#replace:{{{event|}}}|'|\'}}'}}
|title={{{event|}}} &mdash; {{#cargo_query:tables=Event|fields=name_jp|where=name_en="{{{event|}}}"}}
|chapters=<div>[[{{{event|}}}/Episode 1|Episode 1]]</div>
|chapters=<div>[[{{{event|}}}/Episode 1|Episode 1]]</div>
<div>[[{{{event|}}}/Episode 2|Episode 2]]</div>
<div>[[{{{event|}}}/Episode 2|Episode 2]]</div>
Line 15: Line 14:
<div>[[{{{event|}}}/Episode 10|Episode 10]]</div>
<div>[[{{{event|}}}/Episode 10|Episode 10]]</div>
<div>[[{{{event|}}}/Epilogue|Epilogue]]</div>
<div>[[{{{event|}}}/Epilogue|Epilogue]]</div>
{{#ifeq: {{#cargo_query:tables=Event|fields=type|where=name_en="{{{event|}}}"}} | Troupe | <div>'''SSR Backstage'''<br />{{#cargo_query:tables=Cards|fields=CONCAT('[[',Cards.chara,'/',Cards.cardname,'|',Cards.cardname,']]')|where=Cards.cardset='{{{event|}}}' AND Cards.rarity="SSR"}}</div> | }}
{{#ifeq: {{#cargo_query:tables=Event|fields=type|where=name_en='{{#replace:{{{event|}}}|'|\'}}'}} | Troupe | <div>'''SSR Backstage'''<br />{{#cargo_query:tables=Cards|fields=CONCAT('[[',Cards.chara,'/',Cards.cardname,'|',Cards.cardname,']]')=Name|where=Cards.cardset='{{#replace:{{{event|}}}|'|\'}}' AND Cards.rarity='SSR'}}</div> | }}
}}
}}
{{clear}}</includeonly><noinclude>
{{clear}}</includeonly><noinclude>
==Sample==
{{Event Story
{{Event Story
|event=Boy Alice in Wonderland
|event=mAnkai ApArtment!
|troupe=spring
|troupe=spring
}}
}}
==Sample 2==
{{#lsth:Event Story|[[Wizard's Tea Party]]}}
</noinclude>
</noinclude>

Latest revision as of 21:14, 7 January 2025