Last updated December 4, 2019

Preprocess functions allow you change existing variables, or add new variables, for a template file using PHP code.

Learning objectives:

  • Define a function that implements a preprocess hook
  • Define a new variable using PHP and make it available for use within a specific template file