Last modified: 2011-07-22 00:11:29 UTC
The gallery caption attribute is described here: http://www.mediawiki.org/wiki/Help:Images#Optional_gallery_attributes It is handy to show what exactly the semantic gallery represents: Images of horses? Images of grapes? Images of white horses owned by kings? Images of non-extinct grape cultivars used for wine-making in a Mediterranean climate? A query using the gallery caption attribute should look something like this: {{#ask: [[Category:Images]] ?The property for captions of individual images goes here | format=gallery | caption=The caption for the whole gallery goes here | widths=60px | limit=20}} Note that the gallery caption is distinct from each individual image caption, which is already implemented, and not addressed in this report.
(In reply to comment #0) > A query using the gallery caption attribute should look something like this: > > {{#ask: [[Category:Images]] ?The property for captions of individual images > goes here | format=gallery | caption=The caption for the whole gallery goes > here | widths=60px | limit=20}} That's a missing pipe typo. It should be: {{#ask: [[Category:Images]] | ?The property for captions of individual images goes here | format=gallery | caption=The caption for the whole gallery goes here | widths=60px | limit=20}}
Do you happen to know if the native MediaWiki gallery supports such a global caption.
Yes, it does: http://www.mediawiki.org/wiki/Help:Images#Optional_gallery_attributes caption={caption}: sets a caption on the gallery.
Looks like this is already supported by using SMWs into= parameter.
I haven't been able to find any documentation of that. Can you link?
I just added it to: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Result_Formats/gallery_format Wasn't documented before, as quite a few things are not, sadly enough.
> SMW parameters > into > is used as global gallery caption. I tested something similar to this, but no gallery caption was produced: {{#ask: [[Category:Images]] | ?The property for captions of individual images goes here | format=gallery | into=The caption for the whole gallery goes here}}
Typo; should be intro, not into.
Confirmed working. I have updated the documentation with detailed explanation and several examples: http://www.mediawiki.org/wiki/Extension:Semantic_Result_Formats/gallery_format
Awesome! Thanks :)