3.5 Demonstrate ability to write template pre-process functions for overriding custom output
Review how and where to access the HTML preprocess function and the page preprocess function. Review where to access the body class.
Pre-process functions allow variables to be manipulated before rendering. Drupal.org lists all available preprocess functions. Preprocess functions are defined in the THEME_NAME.theme file or in a custom module.
For example
Some variables that are available to html.html.twig and hook_preprocess_html() include * doctype * html * body tags
Some variables that are available to html.html.twig include page elements and regions.
Other Resources
Previous3.4 Demonstrate ability to build or override Twig templates for defining layout contentNextDomain 4.0: Back end development (coding)
Last updated