I have two content types: man and food;

The man content type contains the man's name several more fields and a unique id field created by the serial module.

The second content type is created by the users via an external form. The results from the form are set as the food content type. One of the fields is equal to the unique id field at the man content type.

My question is: 1. I want to create a view that will show me all the man values, But when the value is clicked, it will lead me to a table that contains all the food content type entries where the unique id in food is equal to the man unique id value.

It so easy to do this in php but I am new to drupal.

Any help of lead will be great.


Create a views page and list all food results with a contextual filter on the unique id. Give it a path with a wildcard % . In another block or page list the man names. Include the unique id and put that field on top and exclude it from display. Rewrite the output of the name as a link to the views path but replace the wildcard with the token of the unique id.

  • Thank you, How do i include the token of the unique id at the views path? – DavSev Aug 17 '16 at 5:43
  • As I was saying: you add it as a field in your view. Then you have to excluded it and move it to the top: click on the add button next to fields and rearange – ThomasCouckeDev Aug 17 '16 at 6:15

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.