×

Create Related Content of Different Content Types through Taxonomy in Drupal7

Read Article
Pause
Resume
Stop
Create Related Content of Different Content Types through Taxonomy in Drupal7

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.


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.


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


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.


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


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.


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.


Thank you :)

Comments

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