Fix term-info download captions and thumbnail links to name the template - #476
Merged
Robbie1977 merged 1 commit intoSep 6, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.