From 5d9fa7be866f524aa0d81fcc10c52c79e895fec5 Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Tue, 18 Aug 2026 15:35:21 +0200 Subject: [PATCH] fix(ui): Add hierarchical breadcrumbs for nested objects Display ancestor hierarchy in breadcrumbs for DeviceRole, Platform, and PowerPanel detail views. Shows full parent chain with filtering links to improve navigation through nested object relationships. Fixes #22957 --- netbox/templates/dcim/devicerole.html | 5 ++++- netbox/templates/dcim/platform.html | 3 +++ netbox/templates/dcim/powerpanel.html | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/netbox/templates/dcim/devicerole.html b/netbox/templates/dcim/devicerole.html index 72fdbd3ed..8fb8d9006 100644 --- a/netbox/templates/dcim/devicerole.html +++ b/netbox/templates/dcim/devicerole.html @@ -5,7 +5,10 @@ {% load i18n %} {% block breadcrumbs %} - + {{ block.super }} + {% for devicerole in object.get_ancestors %} + + {% endfor %} {% endblock %} {% block extra_controls %} diff --git a/netbox/templates/dcim/platform.html b/netbox/templates/dcim/platform.html index 26179d4a2..05eeb673a 100644 --- a/netbox/templates/dcim/platform.html +++ b/netbox/templates/dcim/platform.html @@ -9,6 +9,9 @@ {% if object.manufacturer %} {% endif %} + {% for platform in object.get_ancestors %} + + {% endfor %} {% endblock %} {% block extra_controls %} diff --git a/netbox/templates/dcim/powerpanel.html b/netbox/templates/dcim/powerpanel.html index 56f3c5f30..757904988 100644 --- a/netbox/templates/dcim/powerpanel.html +++ b/netbox/templates/dcim/powerpanel.html @@ -4,6 +4,9 @@ {{ block.super }} {% if object.location %} - + {% for location in object.location.get_ancestors %} + + {% endfor %} + {% endif %} {% endblock %}