Function to add variable to drupal template
Use following code to add new variables to Drupal template(page.tpl.php,node.tpl.php etc).
function dpg_preprocess(&$variables, $hook){
$variables['newvar'] = "New var";
}
function phptemplate_preprocess_node(&$vars){
$vars['newvar'] = "New var";
}
function dpg_preprocess(&$variables, $hook){
$variables['newvar'] = "New var";
}
function phptemplate_preprocess_node(&$vars){
$vars['newvar'] = "New var";
}
Comments
Post a Comment