- Issue created by @phjou
The preprocess node seems to check a node type "on_demand_tutorial" which seem wrong and is not defined in the config. I guess it is supposed to be youtube_playlists
/**
* Implements hook_preprocess_node().
*/
function youtube_playlists_preprocess_node(&$variables) {
if ($variables['node']->getType() == 'on_demand_tutorial') {
$youtube_link = $variables['node']->get('field_youtube_url')->uri;
if (!empty($youtube_link)) {
// Override the node URL with the youtube_link.
$variables['url'] = $youtube_link;
}
}
}
Active
1.0
Code