Issue: (Updated issue description) I need to list all properties where their field_development_ref value matches the new_homes_development content types' field_development_ref. The view will be embedded within the new_homes_development node, and that nodes matching properties will be listed at the bottom.

I wanted to create a view with a block pane that will have the node ID contextual filter and then related all properties that share the same field_development_ref value. When I go to the relationships section under advanced I see no ability to related one to the other.

Content type - Property

Fields of interest:
- field_development_ref

Note: This content types data is imported from an external datasource that has no knowledge of the Drupal system via an API.

Content type - New development

Fields of interest:
- field_development_ref


  • Several properties imported may belong to a new_home_development node, like a gated community (the new_home_development) with sub plots (the properties) and if this is the case they will carry the same Development ID stored within field_development_ref
  • The New homes development content type is created manually by a content editor. When filling out the node information they will get the developments ID and put it in the field_development_ref field.

How can I relate one to the other?

The view I have currently is shown below along with the content types in question.

View - Content using new_home_development content type View

Content type "new_home_development" fields new_home_development content type fields

Content type "property" fields (Partial) enter image description here

  • Your configuration is clear enough, thank you for the detas and screenshots. But the issue isn't. I think you're confusing it with the node id. What content exactly do you want to list, and on what pages, with which connections? Do you want to list new development nodes on Project pages, but only those that share the same development ref field? Or vice versa? Or somethng else? It's better if you just first describe the problem without making assumptions about technicalities, then add those if you have any. – prkos Jan 9 at 18:57
  • I have update the issue/requirements of what I am trying to do. – John Cogan Jan 10 at 6:41
  • This would be easy to do if your Development ref field was a reference to a Taxonomy term. It is very common to display sibling content (that share the same terms). But with a text field, the Relationship isn't available in Views so they can't easily be compared. You can probably do it by creating a custom Contextual filter that compares the text values. evolvingweb.ca/blog/… If you don't want to do custom code the best is to create a Vocabulary with Development ref terms and use Entity reference field to those instead of a text field. – prkos Jan 11 at 5:27
  • @prkos Yea I realised this would be done easiest without using a view at all and writing a custom module to simply run a DB API query to get the properties I need. This way I avoid having to write code in the API itself to automatically add taxonomy terms. Cheers for the patience and answers. – John Cogan Jan 11 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.