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.
I am trying to change the visibility of a custom breadcrumb according to the menu level of the node but I can't access $node->menu… (I guess it's not set at the evaluation time).
Is there any way –that I'm not thinking of– to achieve this and have “Breadcrumb A” if menu depth is two and “Breadcrumb B” if menu depth is three?
Comments
Comment #1
MGN CreditAttribution: MGN commentedJust to confirm that I see the same thing. $node->menu doesn't seem to be defined in hook_node_view. Sorry I don't have an alternative right now, but if I come up with something I'll let you know...
Comment #2
lamp5