I would like to pass variables to a single specific template file(tpl.php). My setting is the following:
my_entities.module
function my_entities_theme($existing, $type, $theme, $path) {
return array(
'my_entities_property' => array(
'variables' => array('element' => null),
'template' => 'my-entities-property'
)
);
}
I am using a template file at my_theme/templates/my-entities-property.tpl.php
In the module file I am trying to invoke a preprocess function to add a variable but it is not being invoked.
function template_preprocess_my_entities_property(&$variables) {
$variables['test'] = "test";
}
How could I make this work? I followed https://www.drupal.org/node/2275895#comment-8832701 but it seems that I am doing something wrong.