www-from-model/page_templates/topic.md.j2
Michał Szczepanik 58090f9af2
Some checks failed
Deploy on webserver / Build site and deploy on success (push) Failing after 0s
feat: unify "part of" display
We present "part of" for Objective, Project, and Topic pages. This
commit makes the way it is shown more consistent:

- only show "Part of" if there are elements to show
- show this after the description
- in link targets, expect "xyzrins:" in PID, not "xyzrsens:";
  the latter is from the older demo-rse-group schema, we are using
  demo-research-information

Two minor inconsistencies remain. In project pages, "Part of" is a
header, staying similar to other sections of the page. In topic pages,
the link text uses display label, while others use title.
2026-04-10 19:25:01 +02:00

11 lines
206 B
Django/Jinja

---
title: "{{ display_label }}"
---
{{ description }}
{% if part_of -%}Part of:
{% for item in part_of -%}
- [{{ item.display_label }}](/{{ item.pid.replace('xyzrins:', '') }})
{% endfor %}
{% endif -%}