Template:DiskProducerSeriesGallery: Difference between revisions

From Midipedia
Jump to navigation Jump to search
(Template for disk level of nested gallery view.)
 
(Replace single quotes to work around limitation of passing around Cargo template variables.)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
This template creates a gallery for the disks in the given series.
This template creates a gallery for the disks in the given series. To list disks whose <code>Series</code> field is unset, use the special value <code>Unsorted</code> for parameter <code>3</code>.


'''Usage:'''
'''Usage:'''
Line 18: Line 18:
}}
}}


</noinclude><includeonly>=== {{{3}}} ===
</noinclude><includeonly>=== {{#replace:{{{3}}}|🦟|'}} ===
{{#cargo_query:
{{#cargo_query:
tables=Disks=D
tables=Disks=D
|fields=D.CoverArt, D._pageName = Link, CONCAT('[[', D._pageName, '|', D.Code, ']]', '<br>', D.Title) = Caption
|fields=D.CoverArt, D._pageName = Link, CONCAT('[[', D._pageName, '|', D.Code, ']]', '<br>', D.Title) = Caption
|where=D.Type = '{{{1}}}' AND D.Producer = '{{{2}}}' AND D.Series = '{{{3}}}'
|where=D.Type = '{{{1}}}' AND D.Producer = '{{{2}}}' AND COALESCE(D.Series, 'Unsorted') = '{{#replace:{{{3}}}|🦟|''}}'
|order by=D.SortableTitle, D.Code, D.Title
|order by=D.SortableTitle, D.Code, D.Title
|limit=1000
|limit=1000

Latest revision as of 04:47, 3 January 2025

This template creates a gallery for the disks in the given series. To list disks whose Series field is unset, use the special value Unsorted for parameter 3.

Usage:

{{DiskProducerSeriesGallery
 | 1 = Type
 | 2 = Producer
 | 3 = Series
}}

Example result:

MIDI Game Music Series