Skip to content

499/fragment name in context#503

Merged
tim-band merged 2 commits into
developmentfrom
499/fragment-name-in-context
Jun 17, 2026
Merged

499/fragment name in context#503
tim-band merged 2 commits into
developmentfrom
499/fragment-name-in-context

Conversation

@tcouch

@tcouch tcouch commented May 27, 2026

Copy link
Copy Markdown
Collaborator

closes #499 which asks for the fragment and testimonium display names on antiquarian's pages to put the most relevant name first. This solution uses a template tag, which uses the current work as an argument. When rendering the name, the link matching that work is put at the front and all other links follow.

@tcouch tcouch requested a review from tim-band May 27, 2026 14:56
def get_link_names(self, show_certainty=True):
def get_link_names(self, show_certainty=True, first_work=None):
links = self.get_all_links().order_by("work", "antiquarian", "order")
if first_work:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose you could order by "work == first_work" (descending) (however you write that), which would at least pretend that it might at some point be SQL.
Still this is fine.

@tim-band

Copy link
Copy Markdown
Collaborator

Yeah, this is good.

@tim-band tim-band merged commit 0858a04 into development Jun 17, 2026
6 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.

Make fragment name context dependent

2 participants