Skip to content

Commit

Permalink
NavigationRenderer: Provide a id for outer item markup (<li>)
Browse files Browse the repository at this point in the history
refs #5600
  • Loading branch information
Johannes Meyer committed Sep 4, 2015
1 parent 2855778 commit baefc89
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/Icinga/Web/Navigation/Renderer/NavigationRenderer.php
Expand Up @@ -316,9 +316,13 @@ public function beginItemMarkup(NavigationItem $item)
}

if (! empty($cssClass)) {
$content = sprintf('<li class="%s">', join(' ', $cssClass));
$content = sprintf(
'<li id="%s" class="%s">',
$this->view()->escape($item->getUniqueName()),
join(' ', $cssClass)
);
} else {
$content = '<li>';
$content = '<li id="' . $this->view()->escape($item->getUniqueName()) . '">';
}

return $content;
Expand Down

0 comments on commit baefc89

Please sign in to comment.