I needed a module that automatically creates menu items for a node based on it's position in a taxonomy hierarchy. so i copied the automenu module and changed it for this.

what this module does is when you create taxonomy terms then it'll automatically create menu entries for these and when you assign a node to one of these terms then it'll automatically position this node under this taxonomy term.

this only works for situations where you assign 1 term per node.

I wasn't sure whether i should release this as a separate module or not so i thought it would be best to first check up here whether we can merge the functionality?

CommentFileSizeAuthor
automenu_taxonomy.zip2.16 KBJohnny vd Laar

Comments

dsnoeck’s picture

This is exactly was I was looking for. Thanks for sharing this unknown module. Which also replace the Taxonomy Menu in my case. You should maybe release it as a new module.
Damien

m3n0R’s picture

This module is what I was searching for. I've just installed and tried it, but I think it doesn't work. When I choose the item parent checkbox and after ir I create content, there isn't any item menu created after that...

Is it working for you?

Thanks!

dsnoeck’s picture

Yes, it's working for me. But the configuration to do are in differents page. Here is how to do:
1) Enable automenu Taxonomy module
2) Create a new Vocabulary in admin/content/taxonomy/add/vocabulary
- Select the content type you would like to use with this vocabulary
- in 'Settings', define the 'Default parent menu'
- Save
3) Add terms for this new vocabulary
4) For each content type selected in 2)
- Edit it and under 'Workflow settings', define the 'Taxonomy that is used as parent in the menu'
- Save
5) Create a content with a type selected in 2)
- Select term define in 3)
- Save
6) You can check in admin/build/menu page that your new created content as a menu entry related. You can also define in this place to expend the term entry to see all children in the menu.

Hope that will help you.

brianfisher’s picture

works for me as well, thanks for the instructions.

gugpat’s picture

Hi! Very good solution.

Sadly it isn't what i'm searching for. My problem is that I have 3 menu items called "gallery" under different sections like:

- section 1
-- gallery
- section 2
-- gallery
- section 3
-- gallery

I have a nodetype called "gallery" (gallery assit) and tag each of them with a taxonomy term (section 1 ... 3). On the menu item the user will get to an overview page (view) with all galleries in section n. When the user picks one of the galleries i loose active menu.

My solution is using the "hidden menue item module" (http://drupal.org/node/925358) which uses "none" as menu item titel and reference on a parent menu item which stays active. Everything works fine if I set it manually, but I can't find any solution to set this automatical at node creation. I tested rules, vbo, action ect.

Your module could be the answer if it would be possible to set:

- a parent menu item for each nodetype-taxonomy term combination (using a matrix table?!)
- a menu item titel in node type definition by using tokens or a string like 'none'

Well just think about it :)...

welly’s picture

What would be great functionality is if it can also create menu items based on CCK (text?) fields as well. Would this be possible?

dsnoeck’s picture

For sure it's possible, you can easily change the field to use as menu title in the file automenu_taxonomy.module at line 82. Change:
'link_title' => $node->title,
to:
'link_title' => $node->field_my_cck_field[0]['value'],

Enjoy!

vistree’s picture

Hi, does your modification also work with a hierarchical menu?
I use vocabular -> maintax -> subtax in my taxo. Menu items are not created using your modul.

Is this possible?

Kind regards and a nice weekend

Johnny vd Laar’s picture

No it doesn't work with hierarchical taxonomy terms. Technically it would be possible but I don't have time nor budget to implement this.

Johnny vd Laar’s picture

Version: 6.x-1.x-dev » 6.x-2.0
Status: Active » Closed (fixed)

merged into the new 2.x branch