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.
For a project I needed to filter a dropdown on a dynamic parent. Setting this parent is only possible in the backend and is static.
I created a patch to be able to alter $max_depth and $parent in content_taxonomy_get_terms() in order to do this in the hook_content_taxonomy_tree_callback_alter().
Possibly others will find use cases that need these variables adjusted, which is why I post this patch here.
It's fully backwardscompatible because it just adds a new alter hook argument.
Comment | File | Size | Author |
---|---|---|---|
#2 | content_taxonomy-dynamic-options-2780733-1.patch | 887 bytes | Koen.Pasman |
Comments
Comment #2
Koen.Pasman CreditAttribution: Koen.Pasman at Aubergine IT commentedComment #3
Koen.Pasman CreditAttribution: Koen.Pasman at Aubergine IT commented