From 1a1f6aff7b0c3fd801bfa548fb757b04902767ce Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Fri, 13 Sep 2019 12:08:48 -0500 Subject: [PATCH] Closes: #3495 --- docs/additional-features/custom-links.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/additional-features/custom-links.md b/docs/additional-features/custom-links.md index 91dd06e30..7c96eba8b 100644 --- a/docs/additional-features/custom-links.md +++ b/docs/additional-features/custom-links.md @@ -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 ``` -{% 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." +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 You can specify a group name to organize links into related sets. Grouped links will render as a dropdown menu beneath a