mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes: #3495
This commit is contained in:
@ -24,11 +24,19 @@ Only links which render with non-empty text are included on the page. You can em
|
|||||||
For example, if you only want to display a link for active devices, you could set the link text to
|
For example, if you only want to display a link for active devices, you could set the link text to
|
||||||
|
|
||||||
```
|
```
|
||||||
{% if device.status == 1 %}View NMS{% endif %}
|
{% if obj.status == 1 %}View NMS{% endif %}
|
||||||
```
|
```
|
||||||
|
|
||||||
The link will not appear when viewing a device with any status other than "active."
|
The link will not appear when viewing a device with any status other than "active."
|
||||||
|
|
||||||
|
Another example, if you want to only show an object of a certain manufacturer, you could set the link text to:
|
||||||
|
|
||||||
|
```
|
||||||
|
{% if obj.device_type.manufacturer.name == 'Cisco' %}View NMS {% endif %}
|
||||||
|
```
|
||||||
|
|
||||||
|
The link will only appear when viewing a device with a manufacturer name of "Cisco."
|
||||||
|
|
||||||
## Link Groups
|
## Link Groups
|
||||||
|
|
||||||
You can specify a group name to organize links into related sets. Grouped links will render as a dropdown menu beneath a
|
You can specify a group name to organize links into related sets. Grouped links will render as a dropdown menu beneath a
|
||||||
|
Reference in New Issue
Block a user