Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By elgwiedo on
I have created a custom theme where i add some variables
function blackresponse_preprocess_node(&$vars) {
...
$vid = db_query("SELECT vid FROM ip_taxonomy_vocabulary WHERE machine_name LIKE '%video%' ")->fetchField();
$catnames = taxonomy_get_tree($vid, 0, 1, TRUE);
$vars['cats'] = $catnames;
I can see the vars in my firePHP logging.
However, the $vars array is empty in my node--video.tpl.php.
Do I need to pass it somehow ?
Comments
Solution found
OK, I found it myself.
Thought I could use
but this worked :