Only render icons of root navigation items
The upcoming navigation dashboard creates its links from the menu items in configuration.php. Now, we encourage users to specify icons for second-level menu items but do not want render them in our menu.
This commit is contained in:
parent
3660606ca1
commit
21dbe4ec47
|
@ -162,6 +162,9 @@ class RecursiveNavigationRenderer extends RecursiveIteratorIterator implements N
|
|||
foreach ($this as $item) {
|
||||
/** @var NavigationItem $item */
|
||||
if ($item->shouldRender()) {
|
||||
if ($this->getDepth() > 0) {
|
||||
$item->setIcon(null);
|
||||
}
|
||||
if ($this->getUseStandardItemRenderer()) {
|
||||
$renderer = new NavigationItemRenderer();
|
||||
$content = $renderer->render($item);
|
||||
|
|
Loading…
Reference in New Issue