NavigationRenderer: Provide a id for outer item markup (<li>)

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-04 09:41:39 +02:00
parent 2855778dc7
commit baefc89f85
1 changed files with 6 additions and 2 deletions

View File

@ -316,9 +316,13 @@ class NavigationRenderer implements RecursiveIterator, NavigationRendererInterfa
}
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;