Project:Taxonomy menu
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If the 'Item for Vocabulary' option is disabled, then menu items are created in the root of the menu.
I can move them to the right place, but if future terms are added, there is a maintenance problem, as someone with menu access needs to go back and put the new term menu items in the right place.

This problem would be avoided if the options for the taxonomy menu had a setting for the parent menu item to place items into.

Comments

#1

This problem would be avoided if the options for the taxonomy menu had a setting for the parent menu item to place items into.

This will be added to V3 as the concepts of 'menu groups' is introduced. Menu groups will allow for more customizations to what group of terms will display where in the menu. She this post for more details: #388486: Basic considerations for latest version

I want to make sure we don't have a bug also here. If you add a new child term to a parent term then it would retain the same place in the hierarchy.

Vocab:
term1
term2
-term2.1
-term2.2
term3

You add the vocabulary then move term like so

Menu:
menu item
menu item
-term1
-term2
--term2.1
--term2.2
-term3

If you add term term 2.1.1 then the menu should be:
menu item
menu item
-term1
-term2
--term2.1
---term2.1.1
--term2.2
-term3

Please confirm that this is your situation. You are adding a term4 which is making this menu?:

menu item
menu item
-term1
-term2
--term2.1
---term2.1.1
--term2.2
-term3
term4

If so, then I see your pain. Adding it to the current version makes sense.

#2

Yes, I think we're talking about the same thing:

I want this structure
- existing menu item
- existing menu item (set as parent for this module's items)
-- term 1
-- term 2
--- term 2.1
-- term 3
- existing menu item

When site admins create a new term, say either term 4 or term 2.2, we should get this:
- existing menu item
- existing menu item (set as parent for this module's items)
-- term 1
-- term 2
--- term 2.1
--- term 2.2
-- term 3
-- term 4
- existing menu item

With the current version, the extra terms just appear as top-level items at the end of the menu.

I need to get this working for a client, so expect a patch shortly :)

#3

A patch would be great! One note is that term 2.2 should be placed in the correct spot already. Is it not?

#4

Status:active» needs review

Here's a patch on the CVS 6-2 branch.
I'm replacing the menu selection with a single drop-down to pick menu and location -- the same as when you edit a regular menu item.
There's an extra variable that stores the parent.
The change in logic code is in _taxonomy_menu_save(), which considers the parent term and vocabulary menu item first, before falling back to the set variable (in the existing version, this case gives us a 0, and hence the new menu item is created at the root level).

AttachmentSizeStatusTest resultOperations
taxonomy_menu_menu_parent_CVS.patch3.98 KBIgnored: Check issue status.NoneNone

#5

Wow. That was quick :)

#6

Yup, term 2.2 gets placed correctly in the current version, sorry!

#7

This has been added to the newest DEV

#8

What happened to this? does not seem to be available in DEV..
EXACTLY what I'm looking for.

#9

It was backed out of DEV because it caused other issues which made it to stable. It needs to be tested more before I commit again. Go ahead and apply the patch and test it out. I won't have time until this weekend.

http://drupal.org/node/60108

#10

It works great for me on my production site, but as that other issue showed, there's a problem coming from an earlier version. So kind of upgrade path might be needed to change the settings?

#11

The patch fails on the latest dev, would it be possible to reroll it please.

#12

Rerolled on latest 6--2 branch.

AttachmentSizeStatusTest resultOperations
taxonomy_menu_menu_parent_CVS_2.patch3.64 KBIgnored: Check issue status.NoneNone

#13

Ah, I just did it myself as well. Seems to work fine, but haven't tested all the options. That's why we should write tests.

#14

Yup -- it seems it causes this problem: http://drupal.org/node/411136
but I'm a bit baffled as my patch doesn't change how the path is made...

#15

Path is a little complicated. I tried to do my best to describe it here http://drupal.org/node/380652 under the hook_taxonomy_menu_path section.

Please continue to test this. It's a great feature. I'm trying to spend time on V3 and menu groups. This feature will also be part of V3.

#16

subscribe

#17

Tested the patch.
Never needed to vocabulary summary menu item, so didn't test or care about that part.
The rest works great.

#18

Tried the patch too against 6.x-2.4-beta1 and I'm not experiencing any problems so far. Subscribing to this thread just in case.

#19

@bitsantos

did you have the "item for vocabulary"

#20

Title:add an option for the menu item under which to place taxonomy items» Add taxonomy items to any menu
Status:needs review» reviewed & tested by the community

Updated patch to work with latest dev version.

Tested - seems to be working well!

AttachmentSizeStatusTest resultOperations
taxonomy_menu-408288-20.patch3.7 KBIgnored: Check issue status.NoneNone

#21

Status:reviewed & tested by the community» fixed

Committed: http://drupal.org/cvs?commit=297860

#22

Status:fixed» closed (fixed)

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