Hello, I am the maintainer for taxonomy_menu and I had a request to integrate with domain access (#406732: Integrate with Domain Access). I took a look through your code and read through the documentation but I'm having a little trouble finding how to integrate.
Basically, taxonomy menu pulls the term information, creates a path (by calling an invoke) and creates the menu using menu_link_save. Taxonomy menu does not use hook_menu or handle any of the page call backs.
I was hoping to find hook_menu_link_alter used so I could just pull the current domain and add an option to menu_link_save but I don't think this is the case.
Please lead me in the correct direction.
Comments
Comment #1
agentrickardI am not sure. DA is a node access module. So it controls node visibility. Node-based menu items are sensitive to node access rules. But your menu items are not nodes, right?
How does Taxonomy Menu interact with modules like OG? Are you correctly using db_rewrite_sql(), or do you not do any node listing queries?
Comment #2
indytechcook commentedI haven't tested OG integration yet. Good idea though.
Here is the process Taxonomy Menu goes through to save the menu link.
There are 2 options with in taxonomy menu that are really affected. An option to hide the menu items that have no nodes attached and other to display the number of node for that term. Both function use the same function to count the number of nodes on the term.
I have an idea how to implement this. The function that counts the term for the node would have to take in consideration what sub domain they are attached to. Since this is a per user setting, the taxonomy menu will have to rebuild it's self each time a new user logs in (different then the drupal menu rebuild).
Here is the only function that pulls node data. It just used to get a count. This is where I need to make the edit. Everything else pulls from either {term_data}, {term_node} or taxonomy menu tables.
Thanks for you help.
Comment #3
agentrickardThere's your problem. That function needs to be wrapped in db_rewrite_sql() in order to work with Node Access modules. You don't want a Domain-specific fix, just a proper implementation of the API.
See http://api.drupal.org/api/function/db_rewrite_sql and http://api.drupal.org/api/group/node_access/6.
Comment #4
indytechcook commentedThanks alot. I'll add to the module and let you know what happens.