From c60839d798af23387438770055ac7efa60bfc7e7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 4 Sep 2015 09:25:58 +0200 Subject: [PATCH] NavigationItemRenderer: Provide a id if none is set refs #5600 --- .../Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php b/library/Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php index 00a42d407..e942e7078 100644 --- a/library/Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php +++ b/library/Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php @@ -160,6 +160,10 @@ class NavigationItemRenderer $label = $this->view()->icon($icon) . $label; } + if (! $item->getAttribute('id')) { + $item->setAttribute('id', $item->getUniqueName()); + } + if (($url = $item->getUrl()) !== null) { $content = sprintf( '%s',