0

There are numerous articles on how to display related nodes from taxonomy. In all these articles, it states to set contextual filter: Has Taxonomy Term & select option: Taxonomy Term ID from URL.

In my case, I do not have any taxonomy term in the node URL

I want to display nodes which have common terms when the term is NOT in the URL.

I have tried the approach in many articles that require the option: Taxonomy Term ID from URL & select "Load default filter from node page, that's good for related taxonomy blocks" and further to select the Vocabulary.

I have tried this approach, however, it does not show any related content, possibly as I do not have any terms in the URL?

Please advice.

  • where do you want to try this? in node page? – Yusef Mar 27 '17 at 9:36
  • Yes, in the node display page – Girish Cholayill Mar 27 '17 at 9:40
  • do you have any custom node--your-contenttype.tpl.php , or page--your-contentype.tpl.php for your content type? – Yusef Mar 27 '17 at 10:38
  • Yes, I have custom content types. – Girish Cholayill Mar 27 '17 at 10:51
  • I mean custom template for page and node of your content type – Yusef Mar 27 '17 at 11:09
1

Resolved it by using the following method:

Under Advanced → Contextual Filter: "Vocabulary Name" → Taxonomy Term ID from URL → Load default filter from node page, that's good for related taxonomy blocks → Select Limit terms by vocabulary → Select the appropriate Vocabulary → Under "Multiple-value handling" Select the appropriate option as per your requirement (either "Filter to items that share all terms" OR "Filter to items that share any term". That's it. It worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.