I would like to be able to limit the context-sensitive menu block for selected vocabulary and its terms.
Vocabulary 1
- A Term 1.a
- C Term 1.b
Vocabulary 2
- B Term 2.a
- D Term 2.b
is now being dispalyed in the menu block as
- A Term 1.a
- B Term 2.a
- C Term 1.b
- D Term 2.b
(in alphabetical order)
So you completely loose your category's structure. In my case I only want to display the terms of Vocabulary 2.
Comments
Comment #1
harald.walker commentedIn function taxonomy_context_block
replace:
with:
This will only display the sub-navigation for the active term, including all parent elements but not the vocabulary itself.
The top level terms per vocabulary can be displayed with the buttons function of Taxonomy context. This way you get a nice interface with main and subnavigation.
Comment #2
nedjoI see where this might be desirable, but I'm not sure that everyone would want this behaviour. Could you make this an optional behaviour?
Comment #3
harald.walker commentedI am not maintaining this module. This is just my little private adjustment which I am sharing with you, so that those who want can apply it as well.
I am working on a multi-domain drupal installation with a shared database but separate templates and other settings. The navigation like this taxonomy context menu is one of the more tricky things. Without my 'hack' it would be useless for me.
Comment #4
jack_of_spades commentedYippie kie aie ay! That's 90% of what I need. Many thanks.
Comment #5
geek commentedWish I discovered this thread earlier since I too was offended by the behaviour of the latest taxonomy_context module.
Since I wanted only to show the current vocabulary I fixed it by changing line 498:
$block["content"] = "
\n";
to this
$block["content"] = "
\n";
Of course the author should make this optional.
Comment #6
media girl commentedWonderful!
And thank you for not making this a patch. As it was only a php edit, just editing the file was so much easier.
Comment #7
nedjoGeek's change applied, thanks.
Comment #8
(not verified) commented