function node_preprocess_html in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/node.module \node_preprocess_html()
Implements hook_preprocess_HOOK() for HTML document templates.
File
- core/
modules/ node/ node.module, line 522 - The core module that allows content to be submitted to the site.
Code
function node_preprocess_html(&$variables) {
// If on an individual node page, add the node type to body classes.
if (($node = \Drupal::routeMatch()
->getParameter('node')) && $node instanceof NodeInterface) {
$variables['node_type'] = $node
->getType();
}
}