Language
  • English
  • Français
Drupal custom theming or module development price estimate calculator

Advanced Taxonomy Blocks module for Drupal 6 released today!

After spending the last week and a half coding like a mad man and testing the thing to make sure there were no glaring bugs I am finally releasing the Advanced Taxonomy Blocks module. This module took a lot more time and effort than I had expected due to the fact that the Drupal api doesn’t provide a taxonomy tree array that gives all of the necessary information in order to integrate with the JQuery menu module and also due to the fact that I had to rewrite a couple of functions in the JQuery menu module in order to get it to open up for other modules to use.

I have set up an example block so that you can see the module in action. If you look to your lower right at the block labeled “Categories” you can see it in action.

In addition to the tight integration with the JQuery menu module which gives it the nice click and expand functionality this module is very flexible in the way it allows you to create blocks and route the paths by vocabulary. With the Advanced Taxonomy Module (unlike any other taxonomy related menu I have used) you can create multiple blocks with total control over the number of vocabularies per block and the routing of the paths for each vocabulary per block.

To see an example take a look at the Categories block that I have set up as a demo. While I set the “Topic” Vocabulary to route to the default taxonomy path (taxonomy/term/%tid) For the “Drupal Tutorials by Difficulty Level” I instead routed the links to a view which was designed to catch the tids as arguments. I also built in the ability to customize the link titles (the text viewed when hovering over the link) as well as the titles of the individual vocabularies (with the option of disabling the titles altogether by entering ). This flexibility may not seem very interesting to the Drupal novice, but to an experienced Drupal developer this will open up a whole new world of possibilities for views and other modules which make use of taxonomy.
The module also comes with a bonus Forums block which gives a click and expand menu for forum hierarchies.

The Advanced Taxonomy Module requires JQuery Menu 6x1.8 or higher and will require a visit to the modules page to clear the registry.

To download the module please visit the project page at http://drupal.org/project/taxonomyblocks

very good module

This is amazing module. Well done. But I wish that while coupled with JqueryMenu thing, a Vocbulary itself becomes like a expand/collapse menu!! Doesnt seeem to happen that way yet.

I'm considering it

Aaron's picture

@guarav, I'm considering adding this functionality. I have the thought of creating a JQuery Collapsiblock replacement that could be used in more situations than collapsiblock can. I want to take some time and use the most reusable approach rather than repeat myself over and over.

good module

This is a very good module. Thank you!

I have two vocabulories. How

I have two vocabulories. How to use this to create two seperate blocks?

Question

I have two vocabulories. How can I create two blocks using this?

Question

How this will work for multiple vocabulories

The obvious question...Drupal 5

Hi Aaron,

I'll be honest: this module is exactly what I need, for precisely the same reasons you created it. I am "stuck" in Drupal 5, and was curious if you have given any serious thought (or even effort) to porting this back to Drupal 5. You know your code better than anyone, so I'm curious if your module relies on D6-specific functionality.

Thanks,

Matt
--

Wondering about the counter after Parent-Terms

Hi Aaron,

first of all - great work! We'll use your module on our site to display a hierarchy of related terms. Secound Thing. I'm not a drupal-pro and haven't wrote any moduls yet. When I use you module (hopefully in the right way) I was wondering about the number of items displayed after the parent terms in the Term-Hirarchy.

Let me give you a little example:

ParentTerm Fruit
Child1 Apple
Child2 Orange
Child3 Banana
ParentTerm Vegetables
ChildTerm1 ...
ChildTerm2 ...
...

When I assign the Taxonomie-Terms to my nodes, I only assign the child-Terms, e.g. Apple oder Orange. Then I create a view, passing Term-ID (with depth), Term-ID: Depth-Modifier (just like the default taxonomy_term(default)-View). I use a depth of 3, so when I pass a parent-Term-Id like Fruit, all Child-Nodes with max. depth of 3 are also displayed. That works fine...

When I look at the Block, created with your Taxonomy-Block-Modul, then it creates the Hirarchy correctly, but displays count-number of 0 behind the Parent-Term. I would have expectet that it counts up the numbers of the child-Nodes, e.g.

Parent Fruit (9)
Child Apple (5)
Child Orange (3)
Child Banana (1)

The other way round... When I also assign the Parent-Terms to the child -Terms (I assign a node the term apple and also the term Fruit) than the displayed number is as expected.

A long text with a simple question. Am I wrong, or is there a litte bug in the count-up?

Wondering about the counter after Parent-Terms

Hi Aaron,

first of all - great work! We'll use your module on our site to display a hierarchy of related terms. Secound Thing. I'm not a drupal-pro and haven't wrote any moduls yet. When I use your module (hopefully in the right way) I was wondering about the number of items displayed after the parent terms in the Term-Hirarchy.

Let me give you a little example:

- ParentTerm Fruit
+Child1 Apple
+Child2 Orange
+Child3 Banana
-ParentTerm Vegetables
+ChildTerm1 ...
+ChildTerm2 ...
...

When I assign the Taxonomie-Terms to my nodes, I only assign the child-Terms, e.g. Apple oder Orange. Then I create a view, passing Term-ID (with depth), Term-ID: Depth-Modifier (just like the default taxonomy_term(default)-View). I use a depth of 3, so when I pass a parent-Term-Id like Fruit, all Child-Nodes with max. depth of 3 are also displayed. That works fine. So I expect that your Module also counts for Child-Notes when displaying the Hirarchy.

When I look at the Block, created with your Taxonomy-Block-Modul, then it creates the Hirarchy correctly, but displays count-number of 0 behind the Parent-Term. I would have expected that it counts up the numbers of the child-Nodes, e.g.

Parent Fruit (9)
Child Apple (5)
Child Orange (3)
Child Banana (1)

The other way round... When I also assign the Parent-Terms to the child -Terms (I assign a node the term apple and also the term Fruit) than the displayed number is as expected.

A long text with a simple question. Am I wrong, or is there a litte bug in the count-up?

Or must I assign Both, the parent-terms and the child-terms as well. This is a little bit strange, bechause when I have a Hirarchy with depth 10, than a child-Node at the deepest level must have all Terms of it's parent to ensure that the could up of all parent are correct.

Hope you can follow my descriptions...

Greetz from Germany

Longvalley

Count Up after Parent-Terms

Hi Aaron,

first of all - great work! We'll use your module on our site to display a hierarchy of related terms. Secound Thing. I'm not a drupal-pro and haven't wrote any moduls yet. When I use your module (hopefully in the right way) I was wondering about the number of items displayed after the parent terms in the Term-Hirarchy.

Let me give you a little example:

- ParentTerm Fruit
+Child1 Apple
+Child2 Orange
+Child3 Banana
-ParentTerm Vegetables
+ChildTerm1 ...
+ChildTerm2 ...
...

When I assign the Taxonomie-Terms to my nodes, I only assign the child-Terms, e.g. Apple oder Orange. Then I create a view, passing Term-ID (with depth), Term-ID: Depth-Modifier (just like the default taxonomy_term(default)-View). I use a depth of 3, so when I pass a parent-Term-Id like Fruit, all Child-Nodes with max. depth of 3 are also displayed. That works fine. So I expect that your Module also counts for Child-Notes when displaying the Hirarchy.

When I look at the Block, created with your Taxonomy-Block-Modul, then it creates the Hirarchy correctly, but displays count-number of 0 behind the Parent-Term. I would have expected that it counts up the numbers of the child-Nodes, e.g.

Parent Fruit (9)
Child Apple (5)
Child Orange (3)
Child Banana (1)

The other way round... When I also assign the Parent-Terms to the child -Terms (I assign a node the term apple and also the term Fruit) than the displayed number is as expected.

A long text with a simple question. Am I wrong, or is there a litte bug in the count-up?

Or must I assign Both, the parent-terms and the child-terms as well. This is a little bit strange, bechause when I have a Hirarchy with depth 10, than a child-Node at the deepest level must have all Terms of it's parent to ensure that the could up of all parent are correct.

Hope you can follow my descriptions...

Greetz from Germany

Longvalley

Thank you for this wonderful

Thank you for this wonderful module!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Ask a question related to Drupal development or administration