Category:Advertisements
https://stackoverflow.com/questions/54164025/mediawiki-how-to-use-all-images-from-a-category-in-a-gallery If you didn't mind using a different extension, Cargo can do this pretty easily (and lots of other useful stuff as well).
In Template:Artwork do something like:
{{#cargo_declare: _table = artworks
| description = Wikitext
| artist = Page
}}
- Description
- {{{description}}}
- Artist
- [[{{{artist}}}]]
And then where you want the gallery (e.g. on a page for an artist), do something like:
{{#cargo_query: tables = artworks |fields = _pageName, description, artist |where = artist = 'Advertisements' |format = gallery |caption field = description |show filename = 0 |show dimensions = 0 |show bytes = 0 }} This assumes that the Artwork template is used on files' pages; if you wanted a mainspace page for each artwork, you could still do something similar but would have to introduce a separate image field that points to the actual file.
Pages in category "Advertisements"
The following 2 pages are in this category, out of 2 total.
Media in category "Advertisements"
The following 2 files are in this category, out of 2 total.
- WCD18500321p4 Ohio House.png 434 × 369; 41 KB
- WCD19000905p2 Yoder Hotel National Hotel of Orrville.png 346 × 258; 58 KB