Taxonomy search result show only the direct contents of the a term. In many cases we have parent/ancestor hierarchical taxonomy terms. If we select a parent term in the custom search form, we may also want to get results from all children taxonomy terms.
I know it's possible to do it by manually selecting all sub terms in the multiple selection drop-down list, but if you have complex taxonomy hierarchy with hundreds of terms, this will be extremely painful to select from a top level term.
I would really like to have a configurable checkbox in the custom search block config form, if checked, taxonomy search will return all nested results rather than just the direct results.
I found similar issues for old versions of Drupal,
for D7
https://www.drupal.org/node/2342301
for D6:
https://www.drupal.org/node/1165538
I don't known if they are fixed or not, but in 8.x-1.x, this function is still missing.
Comment | File | Size | Author |
---|---|---|---|
#3 | taxonomy_search_return-2893847-3.patch | 3.25 KB | lvbeck |
Comments
Comment #2
lvbeck CreditAttribution: lvbeck commentedI implement this feature by myself.
In the custom search block config form, under TAXONOMY, for each vocabularies now you will see one more option called "Nested", if this checkbox is checked, taxonomy search will return nested results rather than just the direct results.
feel free to use it.
Comment #3
lvbeck CreditAttribution: lvbeck commentedsorry, taxonomy_search_return-2893847-2.patch is based on 8.x-1.x, here is the correct patch for 8.x-1.x-dev.
Comment #4
lvbeck CreditAttribution: lvbeck commentedComment #5
lvbeck CreditAttribution: lvbeck commented