In it is current state, the TB Mega Menu module to not work along with Domain Menu Access.
These steps assumes you have domain_access installed on your site with configured domains.
- Install both tb_megamenu and domain_menu_access.
- Create a menu and enable domain_menu_access for it.
- Add items to this menu with domain menu access configuration.
- Configure TB mega menu with this menu
- Use the TB mega menu block to display the menu
The domain menu access configuration for these menu items won't be considered, and all links will be displayed ignoring the current domain.
Use the checkDomain() method defined by domain_menu_access by adding it to the manipulator list in template_preprocess_tb_megamenu():
$moduleHandler = \Drupal::service('module_handler');
if ($moduleHandler->moduleExists('domain_menu_access')) {
$manipulators[] = [
'callable' => 'domain_menu_access.default_tree_manipulators:checkDomain'
];
}
A similar implementation can be found in the DomainMenuAccessMenuMenuBlock class.
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.