December 2016
Beginner to intermediate
1005 pages
21h 54m
English
Drupal 8 uses variables to output data within Twig templates. We know that variables generally consist of anything from a simple string to a complex object containing an array of values. If we look at the html.html.twig template, we will see documentation that outlines the variables available to us along with the name of the variable and a description of what the variable contains:
Variables: logged_in: A flag indicating if user is logged in. root_path: The root path of the current page (e.g., node, admin, user). node_type: The content type for the current node, if the page is a node. head_title: List of text elements that make up the head_title variable. May contain or more of the following: - title: The title of the page. - ...
Read now
Unlock full access