Hi everybody!
I hope I'll be understandable because my English is not very fluent.
So, everything is in the title. I have replaced my taxonomy term default pages by views pages. And, I would like to display the description of my taxonomy term only if it is child of a specific taxonomy term.
So I had the idea to make a view taxonomy term block that I would display on these specific pages. The problem is that i can't say "display only this block on pages vocabulary/*" because i have others taxonomy term for which I dont want to display their descriptions.
I have seen on internet that I could display my block on specific pages using a PHP code. So I would like to know the name of the variable that contains the id of the parent term of a taxonomy term, and the variable that contains the informations on the taxonomy term displayed.
But if you have a better idea to solve my problem, I would accept it with pleasure!
Thanks!
Comments
---
You don't need php for this block, you can do this with a content type and a view. Create a new content type, and add in the same taxonomy reference. Add content of the new type, one node for each taxonomy term.
For the view, create a "block" view, then add a contextual filter and "provide default value", with type "Taxonomy term ID from URL". Then check off the "Load default filter from node page, that's good for related taxonomy blocks" checkbox, as well as "Limit terms by vocabulary". Then check off your taxonomy vocabularies. Add a filter criteria set to the new content type.
Then move your block into the designated region, and it should display the specific block when the vocabularies match.