O'Reilly logo

Drupal 7 Cookbook by Dylan James

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building complex views using relationships

When creating a new View, there are many fields available that can be added to the display. However, where the content type being used in the view has an intrinsic relationship to another content type, a relationship can be added to the View, which allows the View to make use of fields from the related content type. In this recipe we will create a View with a relationship to the User content type, and we will utilize this relationship so that we can output a list of news articles, with the author's profile picture in the display, as illustrated in the following screenshot:

Building complex views using relationships

Getting ready

To complete this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required