Difference between revisions of "OmniMedia"

From Sega Retro

 
(One intermediate revision by the same user not shown)
Line 36: Line 36:
 
|group by=releases.name
 
|group by=releases.name
 
|order by=releases.date
 
|order by=releases.date
 +
|format=template
 +
|template=OmniMedia/Cargo
 +
|default=
 +
}}}}{{#vardefine:eventresult|{{#cargo_query:
 +
tables=relationships,events
 +
|fields=relationships.name=eventname,events.startdate
 +
|where=relationships.relatedto="{{FormatSQL|{{{1|}}}}}" and relationships.relationshiptype="event"
 +
|join on=relationships.name=events.name
 +
|group by=events.name
 +
|order by=events.startdate
 
|format=template
 
|format=template
 
|template=OmniMedia/Cargo
 
|template=OmniMedia/Cargo
Line 43: Line 53:
 
#if:{{#var:musicresult}}|'''Music:''' {{#sub:{{UnformatSQL|{{#var:musicresult}}}}|0|-2}}<br/>|}}{{
 
#if:{{#var:musicresult}}|'''Music:''' {{#sub:{{UnformatSQL|{{#var:musicresult}}}}|0|-2}}<br/>|}}{{
 
#if:{{#var:audiobookresult}}|'''Audiobooks:''' {{#sub:{{UnformatSQL|{{#var:audiobookresult}}}}|0|-2}}<br/>|}}{{
 
#if:{{#var:audiobookresult}}|'''Audiobooks:''' {{#sub:{{UnformatSQL|{{#var:audiobookresult}}}}|0|-2}}<br/>|}}{{
#if:{{#var:videoresult}}|'''Videos:''' {{#sub:{{UnformatSQL|{{#var:videoresult}}}}|0|-2}}<br/>|}}{{clearvar|bookresult|musicresult|audiobookresult|videoresult|prereleaseresult}}</includeonly><noinclude>[[Category:Sega Retro templates]]
+
#if:{{#var:videoresult}}|'''Videos:''' {{#sub:{{UnformatSQL|{{#var:videoresult}}}}|0|-2}}<br/>|}}{{
 +
#if:{{#var:eventresult}}|'''Events:''' {{#sub:{{UnformatSQL|{{#var:eventresult}}}}|0|-2}}<br/>|}}{{clearvar|bookresult|musicresult|audiobookresult|videoresult|prereleaseresult|eventresult}}</includeonly><noinclude>[[Category: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.
  

Latest revision as of 11:15, 22 February 2023