Skip to content
Snippets Groups Projects
Commit 188ddeeb authored by João Ventura's avatar João Ventura
Browse files

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
Branches
Tags
No related merge requests found
......@@ -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}";
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment