Page MenuHomePhabricator

Gallery format needs the gallery caption attribute
Closed, InvalidPublic

Description

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.


Version: unspecified
Severity: enhancement

Details

Reference
bz30004

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:47 PM
bzimport set Reference to bz30004.

(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.

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?

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}}

Confirmed working. I have updated the documentation with detailed explanation and several examples:

http://www.mediawiki.org/wiki/Extension:Semantic_Result_Formats/gallery_format