I am having trouble. I am new to drupal. Seeking help.


A=content types (page) that contains one unique field called access_district as shown in image below
Only local images are allowed.

B=another content types (page) that contains one unique field called event_district as shown in image below
Only local images are allowed.

Now i want to generate view with Page A as main page (about district) and in this page i want to show only the events that occurs in this district. As image below:
Only local images are allowed.

Problem is, i am unable to do this. I read about relationships and contextual filter. But the tutorials in web do not matches properly.

Can anyone elaborate how to accomplish this.

Thanks in advance..


John_B’s picture

You should make a reference from one node to the other using Entity Reference module. There are other ways of making a reference of one node to another (e.g. Node Reference module) and probably many other ways of structuring the content so as to achieve the same result without a reference (for example depending on the details your use use, Eva module might be suitable as it enables you to attach an event_district view to an access_district node).

Most of the details on how to do these things can be found from following tutorials such as nodeone.se 'Taming the Beast'; the book 'Drupal's Building Blocks'; and reasonably-priced paid tutorials form drupalize.me and and buildamodule.com. When you have learned Views the logic of the modules I mention should be clear. I would personally probably use Eva module for this job, as I like it.