Open llamafilm opened 5 months ago
At first glance, it seems like all that is required is adding these lines in netbox/templates/dcim/device/base.html
{% if object.location %}
<li class="breadcrumb-item"><a href="{% url 'dcim:device_list' %}?site_id={{ object.site.pk }}&location_id={{ object.location.pk }}">{{ object.location }}</a></li>
{% endif %}
As Locations can be nested, I would assume that the full hierarchy would be desirable, so the code would be a little more complicated. It looks like it's already being done on MPTT views themselves, like Location, Region, and Site Group, so it would probably make sense to make a template tag like the existing nested_tree one to handle this use case.
NetBox version
v3.7.0
Feature type
Change to existing functionality
Proposed functionality
When viewing a device, the breadcrumbs at the top of the page currently show the site and parent device. I'd like to also include the location here. Mockup image:
Use case
My devices are primarily organized using the hierarchy Site > Location > Device. This would save a lot of time when editing a device, to be able to quickly jump to a list of other devices in the same location. (By the way, location means room name in my system).
Database changes
none
External dependencies
none