This module provides a default plugin argument for views, with which you can get the parent terms associated with the current node.
It is very useful to get related content from a higher taxonomic level.
Using it in conjunction with the argument "Taxonomy Term: Parent Term" you can get all those nodes for which the parent node's terms is the same as in the current node.
You can get this argument creating the relationship "Content: Taxonomy terms on node"
Example use case
Suppose we have a Taxonomy Tree like these:
|--- Term_A -- Associated to Node_1 and Node_2
|--- Term_B -- Associated to Node_3
|--- Term_C -- Associated to Node_4, Node_5 and Node_6
Views provide a custom default argument to get content related to taxonomy
terms associated to current node. In the example above, Node_3 would not have
related content, Node_1 would have Node_2 as related content and Node_4 would
have Node_5 and Node_6 as related content.
However, this module provides another default plugin argument, to get
associated parent terms. In the example above, Node_3 would have all nodes as
related content. Is useful when there are few content associated with a
- Get this module using git clone and on a drupal 7 distribution.
- Enable module Views parent term default argument.
- Edit/Create a view and add a relationship with "Content: Taxonomy terms on node" and select at least one vocabulary.
- Add contextual filter "Taxonomy term: Parent term", and make sure is using the relationship created previously.
- In filter configuration, select "Provide default value" in "When the filter value is NOT available" fieldset.
- Select "Taxonomy parent term ID from URL" as "Type".
- Uncheck "Load default filter from term page" option.
- Check "Load default filter from node page, that's good for related taxonomy blocks" option and limit terms by vocabulary if necessary.
- If you want to show content related to more than one parent term, be sure that option "Allow multiple values" is enabled on "More" fieldset.
New in 1.1 version
New feature from Issue #1553638 (http://drupal.org/node/1553638):
Added additional option to get content from root parent terms.
View the issue for more info.