我已经对文件设置的说明:
{{Information
|description = A cheeky description
}}
我曾尝试成功使用该CategoryGallery,但我不能让的描述来工作:
我也有使用需要额外extension,他们谈论short_summary
,但是这并不至于我可以看到Information template存在
<catgallery cat="Aubry" bpdcaption="short_summary" />
那么,如何使用类图像MediaWiki的画廊?
如果你不介意使用不同的扩展名,Cargo可以做到这一点很容易地(和其他许多有用的东西,以及)。
在Template:Artwork
这样做:
<noinclude>
{{#cargo_declare: _table = artworks
| description = Wikitext
| artist = Page
}}
</noinclude><includeonly>
{{#cargo_store: _table = artworks
| description = {{{description|}}}
| artist = {{{artist|}}}
}}
</includeonly>
; Description
: {{{description}}}
; Artist
: [[{{{artist}}}]]
然后在您想要的画廊(例如一个页面一个艺术家的),这样做:
{{#cargo_query: tables = artworks
|fields = _pageName, description, artist
|where = artist = '{{PAGENAME}}'
|format = gallery
|caption field = description
|show filename = 0
|show dimensions = 0
|show bytes = 0
}}
这假设艺术品模板上的文件页上使用;如果你想要一个mainspace页面的每个作品,你仍然可以做同样的事情,但必须引入指向实际文件单独image
场。