I have several menu items in my Primary Links menu, defining the sections of my site. For example, I have About Us, Contact Us, and Case Studies as my three Primary Menu top-level items.

I also have a Case Study content type, with quite a few instances of this type.

I have a nodequeue called Featured Case Studies, and it contains three nodes of type Case Study.

I'd like the submenu items under Case Studies to be driven by this Featured Case Studies nodequeue. The idea is that if I edit the order/content of this nodequeue, the Primary Links menu tree will be automatically updated.

Any thoughts on how I might do this?

CommentFileSizeAuthor
#4 nodequeue.admin_.inc_.patch447 bytesjosephcheek
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

solona’s picture

subscribing

amateescu’s picture

Status: Active » Fixed

Your best chance is to take a look at http://drupal.org/project/taxonomy_menu, see how they sync a vocabulary with a menu and maybe borrow some code from there..

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

josephcheek’s picture

Version: 6.x-2.9 » 6.x-2.11
Status: Closed (fixed) » Needs review
FileSize
447 bytes

Taxonomy.module has hook_taxonomy() which notifies modules about taxonomy changes. Nodequeue.module (6.x-2.11) has hook_nodequeue_add, hook_nodequeue_remove, and hook_nodequeue_swap, but only remove works reliably. It also has an undocumented hook_nodequeue_save_subqueue_order_alter which fires *before* the changes are made.

This patch adds hook_nodequeue_saved($sqid, $nodes) which fires *after* the node changes have been made, and only if they succeed.

Status: Needs review » Needs work

The last submitted patch, nodequeue.admin_.inc_.patch, failed testing.

josephcheek’s picture

Yes, it did fail testing, but it appears that the failures had nothing to do with the patch... they are failures in the testing environment.

Status: Needs work » Needs review

mirom queued 4: nodequeue.admin_.inc_.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, 4: nodequeue.admin_.inc_.patch, failed testing.