Page MenuHomePhabricator

Auto file name/label feature for <gallery>
Closed, ResolvedPublic


It would be excellent for the tag &lt;gallery&gt; to have a parameter that automatically applied the names of the individual files within the gallery respectively below each file. On the example page, if the file names could be applied rather than having to manually set each. If a file was manually named, then the tag would not do nothing in the field.

Not sure whether it is asking to much for also for these new filenames to also be able to be hotlinked, either by default (preference) or by addition of another option.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:49 PM
bzimport set Reference to bz21981.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 6913
patch to add parameter showfilename to <gallery>

This is a patch that somewhat does what the bug is requesting, adds a parameter showfilename to the gallery tag, such that:
<gallery showfilename>
Will add the image file name to the gallery (like on category pages). However it will do this in addition to (not instead of) the individual captions for each image.


pdhanda wrote:

Just looked at the patch. I think it looks good. Makes sense that explicit captions are still displayed. I'll check it in.

+need-parsertest, for both variants of behavior.

Created attachment 6936
adds parser tests for gallery

Patch to add parser tests for gallery per Comment 3.

I was somewhat confused by how the parser tests work, so i'm not really sure if i did that right