Site Building

Movie Project: Build a View and Use Image Styles for Drupal 7

Last updated
Categories
Up-to-date with minor version
7.x

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

This exercise will require you to build a view which lists films filtered by genre and create image styles to format images for different purposes.

Goal

Create a view that lists films filtered by genre.

Prerequisites

You will need the following knowledge and skills. If you need a review, check out the Additional resources section at the bottom of this page.

  1. Create a view.
  2. Use arguments to filter the content displayed in a view.
  3. Create image styles to resize images for different purposes.
  4. Configure display modes for use in a view.

Wireframe reference

You will need to refer to the wireframe collection PDF.

  • Reviews By Genre
  • Review Page

Screenshot of a finished view:

Image

Tasks

Create a view of Movie Reviews with the URL of reviews/% which will create a list of films filtered by genre.

Create image styles to resize the image for both the Full Page and Teaser views.

Configure the display mode of the Movie Review teaser to display the required fields.

Create a view to display the Recommended Movies in the left hand block of the Movie Review page.

Hints

  • Use sensible names for image styles, i.e. the purpose of the image, as opposed to the size of the image.

Recap

  • Views are very configurable and can be used to display complex relationships between content items.
  • Views can be used to display content using display modes or fields.

Further your understanding

Additional resources

Creative Commons License

Drupal Training Resources by Damian Robinson are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at http://www.damianrobinson.co.uk.

Hands-On Exercises: Movie Project