Skip to content

Commit

Permalink
Merge pull request #3170 from david-saisondor/bugfix/parent-menu-item…
Browse files Browse the repository at this point in the history
…s-use-wrong-icon

fix(backend-menu): parent menu items use wrong icon
  • Loading branch information
bobdenotter authored Apr 9, 2022
2 parents 60dffe6 + 1085fdf commit 161ca2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Menu/BackendMenuBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,13 @@ private function addContentOthers(MenuItem $menu): void
}

$label = $contentType->get('show_in_menu') ?: $t->trans('caption.other_content');
$icon = $icon ?? $contentType->get('icon_many');

if (! $menu->getChild($label)) {
// Add the top level item

$icon = $contentType->get('icon_many');
$slug = $slugify->slugify($label);

$menu->addChild($label, [
'uri' => $this->urlGenerator->generate('bolt_menupage', ['slug' => $slug]),
'extras' => [
Expand Down

0 comments on commit 161ca2f

Please sign in to comment.