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:bookresult|{{#cargo_query:
+
}}}}{{#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="book"
+
|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:bookresult}}|'''Books:''' {{#sub:{{#var:bookresult}}|0|-2}}<br/>|}}
+
{{#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|bookresult|prereleaseresult}}</includeonly><noinclude>[[Category:Sega Retro templates]]
+
{{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