NavigationItemRenderer: Provide a id if none is set

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-04 09:25:58 +02:00
parent a8d5a78aa2
commit c60839d798
1 changed files with 4 additions and 0 deletions

View File

@ -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(
'<a%s href="%s"%s>%s</a>',