Last updated December 4, 2019
Theming8.9.x/9.0.x

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