node_preprocess_html(&$variables)
Implements hook_preprocess_HOOK() for HTML document templates.
File
- core/modules/node/node.module, line 519
- The core module that allows content to be submitted to the site.
Code
1 2 3 4 5 6 | 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 (); } } |
Please login to continue.