Created
November 14, 2017 15:22
-
-
Save fago/b8f19525b5588e5b3c3a6983281d8e17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_prepprocess_TEMPLATE for the "node" template. | |
*/ | |
function recipes_preprocess_node(&$variables) { | |
// Add your changes here. | |
// Add cacheability metadata to ensure config changes are reflected. | |
$cache_extras = []; | |
\Drupal\Core\Render\BubbleableMetadata::createFromObject($config) | |
->applyTo($cache_extras); | |
render($cache_extras); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment