Skip to content

Fix term-info download captions and thumbnail links to name the template - #476

Merged
Robbie1977 merged 1 commit into
masterfrom
fix/term-info-download-thumbnail-template-labels
Sep 6, 2026
Merged

Fix term-info download captions and thumbnail links to name the template#476
Robbie1977 merged 1 commit into
masterfrom
fix/term-info-download-thumbnail-template-labels

Conversation

@Robbie1977

Copy link
Copy Markdown

Downloads section said 'Image files aligned to <the term's own label>' instead of the template it's aligned to, because each Images/Examples entry's id/label describe the depicted term, not the template — e.g. https://virtualflybrain.org/blog/2022/01/01/1447201088-vfb_jrch06ly/ showed 'Image files aligned to 1447201088' twice, once per template, instead of naming JRC2018U and JRCFIB2018Fum.

Add get_template_label(), a small cached lookup of each template's own Name, and use it for the download caption instead of the image's label.

Thumbnails in the hero card had the same confusion in their alt text, and their links only ever opened the page's own term (?id=), never the specific template + image shown — so clicking a thumbnail didn't open the 3D browser on that alignment. Give each thumbnail a fully descriptive alt (' () aligned to ') and link to ?id=&i=<template_id>,<image_id> so it opens on the right image.

Downloads section said 'Image files aligned to <the term's own label>'
instead of the template it's aligned to, because each Images/Examples
entry's id/label describe the depicted term, not the template — e.g.
https://virtualflybrain.org/blog/2022/01/01/1447201088-vfb_jrch06ly/
showed 'Image files aligned to 1447201088' twice, once per template,
instead of naming JRC2018U and JRCFIB2018Fum.

Add get_template_label(), a small cached lookup of each template's own
Name, and use it for the download caption instead of the image's label.

Thumbnails in the hero card had the same confusion in their alt text,
and their links only ever opened the page's own term (?id=<id>), never
the specific template + image shown — so clicking a thumbnail didn't
open the 3D browser on that alignment. Give each thumbnail a fully
descriptive alt ('<tags> <name> (<id>) aligned to <template>') and link
to ?id=<id>&i=<template_id>,<image_id> so it opens on the right image.
@Robbie1977
Robbie1977 merged commit 7f79b25 into master Sep 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant