Hi @greg, whats your suggestion here, can we fetch node title in else conditi...

Contribution Date
Technology
Contribution Project
Contribution Details

Hi @greg, whats your suggestion here, can we fetch node title in else condition or we can make preferred menu field required. what you think???

$preferred_menu = $this->config->get(EasyBreadcrumbConstants::MENU_TITLE_PREFERRED_MENU); if ($preferred_menu) { $preferred_found = FALSE; foreach ($menu_links as $link) { if ($link->getMenuName() == $preferred_menu) { $menu_link = $link; $preferred_found = TRUE; break; } } if (!$preferred_found) { $menu_link = reset($menu_links); } } <strong>else { $menu_link = reset($menu_links); }</strong>

Or you are expecting to fetch menu link title from node edit form when no preferred menu is selected.
If any page is not an entity page(node page) then what will we do...

Contribution Author
Files count
0
Patches count
0