Create Related Content of Different Content Types through Taxonomy in Drupal7

Create Related Content of Different Content Types through Taxonomy in Drupal7

On11th Jul 2015, 2024-12-02T21:27:45+05:30 ByKarthik Kumar D K | read
Listen Pause Resume Stop

Step 1

  • Create a Taxonomy term field for the content type, In this article lets take example for Basic Page content type as shown in the below image. with the Autocomplete selected as settings of the term reference field.

Create Related Content of Different Content Types through Taxonomy in Drupal7

Step 2

  • And next create/resue the Taxonomy term field for the other content type, In this article lets take example for Article content type as shown in the below image. with the Autocomplete selected as settings of the term reference field.

Create Related Content of Different Content Types through Taxonomy in Drupal7


Step 3

  • Then, Create a content for the basic page content type, Enter title of the field, other fields and enter the data in the Tags field as "Java" as shown in the image and Save the content.
  • Actually, on save of this node, a Taxonomy term as "Java" will be created

Create Related Content of Different Content Types through Taxonomy in Drupal7

Step 4

  • Next, Create a content for the Article content type, Enter title of the field, other fields and enter the data in the Tags field as "Java", this time the term "Java" will be autopopulated as shown in the below image and save the content.

Create Related Content of Different Content Types through Taxonomy in Drupal7

Step 5

  • Next, Create a View block, which list all the content, below image shows the created view

Create a View block

Step 6

  • Then, add a contextual filter select the field "field_tags", which is created earlier in the article, below image describes the settings of this field.

add a contextual filter

  • Assign this view block to the header/highlight region or any the region, which will be visible in the node pages

Step 7

  • Then, visit any node which you have created earilier in the article, this block lists the two contents which are having the Java tag in their nodes, as shown in the below image.

visit any node which you have created earilier in the article

Thanks for reading the article, for more drupal related articles read and subscribe to peoples blog articles.

Related Articles

Recent Articles

Recent Quick Read

Recent Great People

We Need Your Consent
By clicking “Accept Cookies”, you agree to the storing of cookies on your device to enhance your site navigation experience.
I Accept Cookies