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

akleinwaechter created an issue. See original summary.

Vincent_Jo’s picture

subscribing !

Is there already some progress in this issue? (or am I overlooking something?)

best regards

Vincent

quatrys’s picture

And I whoul like to include the node item in menu is possible ?
Or existing another module ?

tyler-durden’s picture

I 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.

DamienMcKenna’s picture

Status: Active » Closed (won't fix)

You 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.

mradcliffe’s picture

As 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.

Morbus Iff’s picture

@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?