Commit 188ddeeb authored by jcnventura's avatar jcnventura

Issue #1281678: allow a node-specific print template in the format...

Issue #1281678: allow a node-specific print template in the format print[_html|_mail|_pdf][.node-node-type[-nid]].tpl.php.
parent 42a86d52
......@@ -193,11 +193,14 @@ function print_preprocess_print(&$variables) {
$format = $variables['type'];
$type = (isset($variables['node']->type)) ? $variables['node']->type : '';
$nid = (isset($variables['node']->nid)) ? $variables['node']->nid : '';
// $variables['theme_hook_suggestions'][] = "print";
$variables['theme_hook_suggestions'][] = "print__node__{$type}";
$variables['theme_hook_suggestions'][] = "print__node__{$type}__{$nid}";
$variables['theme_hook_suggestions'][] = "print__{$format}";
$variables['theme_hook_suggestions'][] = "print__{$format}__node__{$type}";
$variables['theme_hook_suggestions'][] = "print__{$format}__node__{$type}__{$nid}";
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment