1

I'm using Domain Access module (http://drupal.org/project/domain) for running few very similar sites out of single Drupal 6 installation/database.

What I need is to have slightly different menus between those sites.

Generally, most items will be exactly the same throughtout all domains, on some of them though I don't want specific items to be displayed (for example, maybe later there would be other requirements too).

Haven't found any module offering such functionality, so considering other options now.

Simplest and easiest solution would be to hide them using CSS, but definitely this is not a good solution.

hook_menu_alter was disqualified as well, for quite obvious reasons.

What I'm thinking about right now is doing it from theme_menu_item() / theme_menu_item_link() level. Haven't looked yet into possibility of basing it on (something like) node access permissions (which actually would mean writing own module for this), going to do it as well, but meantime perhaps someone could suggest even different approach?

1 Answer 1

2

Right. So I have written my own module to do what I wanted, using hook_form_menu_edit_item_alter() for configuration, and hook_translated_menu_link_alter() for displaying.

If anyone is interested in checking it out, initial dev version of the module is available in my sandbox here - http://drupal.org/sandbox/maciej.zgadzaj/1209152 - before I promote it to full project...

Edit:

Now promoted to full version available here: http://drupal.org/project/domain_menu_access

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.