The Instant View Editor uses a three-column layout, so you really want to use it on a desktop screen that's wide enough. Sorry for the inconvenience.

Back to the main page »

Original

Preview

Link Preview

Issue #5

Missing photo captions in the photo gallery.
Vladimir Kuzmin
Images and captions are stored in diffirent <ul> elements. Each <li> element has its unique id. So image with id=1 is linked to a caption with the same id. I have no idea how to put each <li> from caption <ul> to corresponding image <ul>. Is it even possible?
Accepted by admin
Generally, it's not possible to attach the image li with the caption li by ID. However, both lists use the same order, which can allow these captions to be supported in the IV format.

For example, @prepend_to can be used to move the imgs, in order, to their corresponding captions.

Here is some sample code:
@prepend_to("./ancestor::div[@class=\"full-gallery\"]//ul[@class=\"legends\"]//figure[not(.//img)]"): //div[@class="full-gallery"]//div[@class="images"]/ul/img

After the first img moves into the first figure (that already contains the first figcaption), the second img would move into the first figure that does not already contain an img (the second figure).

This way img order and caption order will be preserved and they can be successfully merged together.
Type of issue
Submitted via the Previews bot
Reported
Aug 20, 2017