On the default Drupal 9 installation, there is a tags field in the article content type. I allowed only one value for this field.
I have created terms and child terms for the tags taxonomy vocabulary.
In manage the form display of the article content type, I chose the "Selection list" widget for the tags field.
I created a view block to display all the nodes and placed it on each node's page.
I excluded the current page ID, with a contextual filter.
I want this block to show nodes sharing the same taxonomy term as well as its parent terms.
**Here is an example**
If I have the following taxonomy :
TAGS
- term 1
- term 2
- - term 3
- - term 4
- - - term 5
- - term 6
- term 7
- - term 8
- term 9
If the page of the current nodes reference term 5, then I want to display from the block all the nodes with the following terms.
- term 2
- - term 3
- - term 4
- - - term 5
- - term 6
If the page of the current nodes reference term 7, then I want to display from the block all the nodes with the following terms.
- term 7
- - term 8
If the page of the current nodes reference term 1, then I want to display from the block all the nodes with the following terms.
- term 1
So I want to have a block that displays all the nodes belonging to the parent terms and to the child terms, of the term of the current page. How can I achieve this?
I couldn't find anything in context filters to do this and I couldn't find any contributed module to help me.
Closed: outdated
9.5
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.