Skip to main content

Post categories

  • Drupal Tips & Tricks
  • Drupal Howtos
  • Drupal Themes
  • X Twitter
  • youtube
Home
Drupal 4U
Drupal Development, Drupal Web Design, Drupal SEO
  • Home
  • Showcases
  • Services
  • Blog
  • Themes
  • About
  • Contact

Breadcrumb

  1. Home
  2. HowTos
  3. Show related nodes in a block based on taxonomy terms with views

Show related nodes in a block based on taxonomy terms with views

HowTos
January 05, 2016
Profile picture for user drupal
By drupal
  • facebook-f
  • twitter
  • envelope
  • print
225

You want to show a related nodes to the current node in a block using taxonomy terms?

There is an excellent article giving a step-by-step guide for Views 3 and Drupal 7 on http://www.metachunk.com/blog/adding-related-content-view-drupal-7. Really easy and comfortable!

Here’s a modified copy:

  1. Create view (block)
  2. Add fields (title, a small image, date, whatever you like). Or teasers, what works as well.
  3. “Arguments” is from now on called “Contextual filters”, so go there.
  4. Add the filters: “Content: Has taxonomy term ID (with depth)” and “Content: Has taxonomy term ID depth modifier”
  5. Configuration on this filter: → When the filter value is NOT in the URL: → Provide default value → Type: Taxonomy Term ID from URL → under that, check the box “Load default filter from node page, that’s good for related taxonomy blocks.” → now check the boxes of the taxonomies you want involved here
  6. Now you need to add the second filter in order to exclude the current node from the list. Click [+] button of the contextual filters section.
  7. Select Content: Nid
  8. Set the ‘when argument is not present’ to ‘Provide default argument’
  9. Set the ‘Default argument type’ to ‘Content ID from URL’
  10. Go to “MORE” , and check the “Exclude” box.
  11. Move the filter “Content: Nid” to the top position.
  12. Add a block to your view and embed the block on your node pages
  13. Save your view

Source: http://scito.ch/content/show-related-nodes-block-based-taxonomy-terms-vi...

Show related nodes in a block based on taxonomy terms with views
Modules

Read more articles

Newer
How to implement Rooms 7.x-1.8 properly - Problem with full calendar library
Older
Drupal views & lightbox: How to add lightbox to a view of images
  • Log in to post comments
Profile picture for user drupal
drupal
225
1
min read
A- A+
  • facebook-f
  • twitter
  • envelope
  • print

Contact Drupal 4U

Get in touch for questions and our Drupal development, design and SEO services.

Contact Us

We aim to reply the latest within 48h.

About Drupal 4U

We are a group of Drupal designers, developers and webmasters and we launched this website to share our experience and knowledge with you. Drupal is a free software package that allows you to easily organize, manage and publish your content, with an endless variety of customization. Drupal is open source software maintained and developed by a very large community of developers and users.

  • X Twitter
  • youtube

Drupal Services

  • Drupal Web Design
  • Drupal Development
  • Drupal SEO
  • Drupal Migration

Drupal 4U

  • Services
  • Showcases
  • Themes
  • Blog
  • About

Drupal Links

  • Official Drupal Website
  • Drupal Answers
  • More Than Themes
  • Theme Forest
  • DXPR: Drupal for Marketers
2012 - 2025, Drupal 4U

Footer menu

  • Contact
Home
Drupal 4U
Drupal Development, Drupal Web Design, Drupal SEO
  • Home
  • Showcases
  • Services
  • Blog
  • Themes
  • About
  • Contact
Clear keys input element