Theming

Add Template Variables in Omega for Drupal 7

Last updated
Categories

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.

Sprout Video

We have a custom template file that has the HTML that we want, but not all of variables are coming through yet, and instead we are getting "Undefined variable" errors. In this lesson we're going to take care of that, as well as making sure our custom variables from the original 960 Robots get moved over as well. Omega has its own best practices around adding preprocess and process functions to a sub-theme, so we'll walk through what Omega expects, and how to use the files and examples that Omega is providing for us. So we're going to:

  • Look at the Omega best practices
  • Create a process include file
  • Add our region variables
  • Add our custom variable from 960 Robots

Additional resources

You can download the final Ninesixty Robots Omega theme as a regular project from Drupal.org.