Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Just took a look at this. It's tricky; not something I want to implement in a short amount of time.
The problem stems from the fact that the fields that join the tables aren't very compatible:
node has an integer for nid, and menu has a string in the form of 'node/NID'.
The other problem is if you have 2 aliases for a given node, you'll get 2 node results in the query (tho hopefully DISTINCT could fix that).
I'm not certain Views' join code is sophisticated enough to do the indirect translation. Thus the not willing to do this in a short amount of time. I may look into this in the future, but I'm marking this postponed to look at some day.
How possible is it to make this work? I would be interested in this as well, although in my own module.. It would be nice with functions that you could give a nid (node id) and it would return an array of all mids (menu ids) - and vice versa. Actually, I think I'll file a feature request for this in D6.
Comments
Comment #1
merlinofchaos commentedBy menu title, do you mean a menu item that's been aliased to the node?
Comment #2
Tobias Maier commentedyes, the title of the menu-item
maybe with an option to specify from which menu it should take the title.
Comment #3
merlinofchaos commentedJust took a look at this. It's tricky; not something I want to implement in a short amount of time.
The problem stems from the fact that the fields that join the tables aren't very compatible:
node has an integer for nid, and menu has a string in the form of 'node/NID'.
The other problem is if you have 2 aliases for a given node, you'll get 2 node results in the query (tho hopefully DISTINCT could fix that).
I'm not certain Views' join code is sophisticated enough to do the indirect translation. Thus the not willing to do this in a short amount of time. I may look into this in the future, but I'm marking this postponed to look at some day.
Comment #4
ximo commentedHow possible is it to make this work? I would be interested in this as well, although in my own module.. It would be nice with functions that you could give a nid (node id) and it would return an array of all mids (menu ids) - and vice versa. Actually, I think I'll file a feature request for this in D6.
Comment #5
dawehnerI'm not 100% sure, but i think you can do it with http://drupal.org/project/menu_node_views
Comment #6
eclipsegc commented