Module Development

Movie Project: Change a Page Programmatically for Drupal 7

Check your version

This tutorial covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Identify and use preprocessors by creating a custom breadcrumb trail on a page, and reduce and refactor code in custom modules.


Create a custom breadcrumb trail to meet the requirements in the wireframe.


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. How to identify scenarios using page preprocessors.
  2. Use Drupal core functions to create a breadcrumb trail.

Wireframe reference

You will need to refer to the wireframe collection PDF.


Create a custom breadcrumb trail to meet the requirements of the wireframes. All elements in the breadcrumb trail should link to their appropriate pages.


  • It’s possible to extract information about the current page to use as a condition by using core menu functions.
  • When writing custom code, reduce duplication and refactor as you go.

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

Hands-On Exercises: Movie Project