Difference between revisions of "OmniMedia"
From Sega Retro
Line 1: | Line 1: | ||
− | <includeonly>{{#vardefine:musicresult|{{#cargo_query: | + | <includeonly>{{#vardefine:bookresult|{{#cargo_query: |
+ | tables=relationships,releases | ||
+ | |fields=relationships.name,releases.date | ||
+ | |where=relationships.relatedto="{{{1|}}}" and relationships.relationshiptype="book" | ||
+ | |join on=relationships.name=releases.name | ||
+ | |group by=releases.name | ||
+ | |order_by=releases.date | ||
+ | |format=template | ||
+ | |template=OmniMedia/Cargo | ||
+ | |default= | ||
+ | }}}}{{#vardefine:musicresult|{{#cargo_query: | ||
tables=relationships,releases | tables=relationships,releases | ||
|fields=relationships.name,releases.date | |fields=relationships.name,releases.date | ||
Line 9: | Line 19: | ||
|template=OmniMedia/Cargo | |template=OmniMedia/Cargo | ||
|default= | |default= | ||
− | }}}}{{#vardefine: | + | }}}}{{#vardefine:audiobookresult|{{#cargo_query: |
+ | tables=relationships,releases | ||
+ | |fields=relationships.name,releases.date | ||
+ | |where=relationships.relatedto="{{{1|}}}" and relationships.relationshiptype="audiobook" | ||
+ | |join on=relationships.name=releases.name | ||
+ | |group by=releases.name | ||
+ | |order_by=releases.date | ||
+ | |format=template | ||
+ | |template=OmniMedia/Cargo | ||
+ | |default= | ||
+ | }}}}{{#vardefine:videoresult|{{#cargo_query: | ||
tables=relationships,releases | tables=relationships,releases | ||
|fields=relationships.name,releases.date | |fields=relationships.name,releases.date | ||
− | |where=relationships.relatedto="{{{1|}}}" and relationships.relationshiptype=" | + | |where=relationships.relatedto="{{{1|}}}" and relationships.relationshiptype="video" |
|join on=relationships.name=releases.name | |join on=relationships.name=releases.name | ||
|group by=releases.name | |group by=releases.name | ||
Line 30: | Line 50: | ||
|default= | |default= | ||
}}}} | }}}} | ||
+ | {{#if:{{#var:bookresult}}|'''Books:''' {{#sub:{{#var:bookresult}}|0|-2}}<br/>|}} | ||
{{#if:{{#var:musicresult}}|'''Music:''' {{#sub:{{#var:musicresult}}|0|-2}}<br/>|}} | {{#if:{{#var:musicresult}}|'''Music:''' {{#sub:{{#var:musicresult}}|0|-2}}<br/>|}} | ||
− | {{#if:{{#var: | + | {{#if:{{#var:audiobookresult}}|'''Audiobooks:''' {{#sub:{{#var:audiobookresult}}|0|-2}}<br/>|}} |
+ | {{#if:{{#var:videoresult}}|'''Videos:''' {{#sub:{{#var:videoresult}}|0|-2}}<br/>|}} | ||
{{#if:{{#var:prereleaseresult}}|'''Prereleases:''' {{#sub:{{#var:prereleaseresult}}|0|-2}}<br/>|}} | {{#if:{{#var:prereleaseresult}}|'''Prereleases:''' {{#sub:{{#var:prereleaseresult}}|0|-2}}<br/>|}} | ||
− | {{clearvar|musicresult| | + | {{clearvar|bookresult|musicresult|audiobookresult|videoresult|prereleaseresult}}</includeonly><noinclude>[[Category:Sega Retro templates]] |
Template that generates relevant media for Omni tables, so you don't have to. | Template that generates relevant media for Omni tables, so you don't have to. | ||
Revision as of 07:55, 20 December 2020
Template that generates relevant media for Omni tables, so you don't have to.
Examples
{{OmniMedia|Space Channel 5: Part 2}}
Books: Space Channel 5 Part 2 Sugoku Sugoi Guide Book (2002)
Music: Space Channel 5 Part 2 Moji Moji ★ Can:sqm:t Stop Remix (2002) | Space Channel 5 Part 2 Soundtrack Volume :qm:Chu!!:qm: (2002) | Space Channel 5 Part 2 Soundtrack Volume :qm:Hey!!:qm: (2002) | Space Channel 5 Part 2 Uha Uha ★ Readymade Remixes (2002) | Space Channel 5 Part 2 Uki Uki ★ Non Stop Mega Mix (2002)