Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm trying to implement a node count like
Fruit (100)
- Apples (30)
- Oranges (70)
The problem is that manipulating the title in the menulink-array doesn't have any effect on the generated menu. Although the title is written into the menutree table the title is pulled out of the termdata.
Is there any chance to change this behaviour? The old taxonomy menu had the possibility of showing the node count and our customer can't understand why so many things in Drupal 8 are "poorer" than in the old version.
Best regards
Alex
Comments
Comment #2
Vincent_Jo CreditAttribution: Vincent_Jo commentedsubscribing !
Is there already some progress in this issue? (or am I overlooking something?)
best regards
Vincent
Comment #3
quatrys CreditAttribution: quatrys commentedAnd I whoul like to include the node item in menu is possible ?
Or existing another module ?
Comment #4
tyler-durden CreditAttribution: tyler-durden commentedI know this is old but I am looking for the same functionality that the D7 verison had of the node count. I tried https://www.drupal.org/project/hierarchical_taxonomy_menu , but this module is way too slow with thousands of taxonomy terms.
I would love to see this implemented in the D8 version.
Comment #5
DamienMcKennaYou could build a separate module that updated the term names based upon the node counts, then Taxonomy Menu should automatically sync the names. But this is out of scope for Taxonomy Menu itself.
Comment #6
mradcliffeAs an alternative, I was able to create a view using views_tree and aggregates (patched with unrelated bug fixes #2793863 and #2793823). Although that module is about to be unsupported with Drupal 8 End of Life.
- Add relationship to taxonomy term parent
- Add relationship to node
- Add a distinct count of the nodes (uuid)
- Add the taxonomy term name field with replacement value
{{ name }} ({{ uuid }})
- Add another taxonomy term name field related to the term parent.
- Set the style to views tree with the main field being the taxonomy term name and parent field being the parent name. default to collapsed.
Comment #7
Morbus Iff@DamienMcKenna, to be clear: the node count feature that was in previous versions of Taxonomy Menu is now out-of-scope for Drupal 9+? Were there previous discussions on removing this feature that I could read?