Hi dude,

this module is great, does exactly what I needed, but Im working with Drupal 6, so I decided to give you a hand and make a patch for it. This is an initial port, a lot of functionalities still need to be ported. I'll be working on it the next week.

The tar.gz file contains the patch and an additional file views_menu_nodes_handler_filter_current_menu_location.inc, which add a new view_handler_filter.

Functionalities ported:

  • Filter by the current menu location

Functionalities which still need to be ported:

  • Filter by an specific menu item's ID
  • Sort order by menu item's weight
  • Argument by menu item's ID and menu item's path

I was thinking on adding some fields such us menu item's title, menu item's path, etc, what do you think?

I couldn't find a function like menu_get_active_nontask_item() for D6, so I used a SQL query :P.

Thanks!

CommentFileSizeAuthor
views_menu_nodes_d6.tar_.gz1.69 KBruloweb

Comments

joachim’s picture

Hi.
Thanks for the patch!

Looks like a good start.
It doesn't apply cleanly for me though -- all three hunks in the module file got rejected.
Also, you should leave in the CVS id string at the top of every file, and add one to new files.

Now some views stuff:
- AFAIK we need to implement hook_views_api for views to even take notice of our module.
- substitutions: we can maybe drop this fairly ugly approach that I had to use in D5. In views 2, a join can specify its own handler, so we could subclass views_join and add the menu item ID into the query there.
- the views_menu_nodes_handler_filter_current_menu_location handler will need some options creating. Also, note the standard naming convention for handlers outlined in views/help/api-handlers.html -- [module]_handler_[type]_[tablename]_[fieldname]

agentrickard’s picture

jn325’s picture

this is exactly what i need, can't wait for it to be ported to 6.x.

agentrickard’s picture

See http://drupal.org/project/menu_node_views for the active development.

joachim’s picture

Status: Needs work » Closed (fixed)

I was going to reply the same thing but couldn't remember the module name :)

I should really put a node about this on the project page.

@agentrickard: how's it going on that? Need a hand?