function ctools_preprocess_node in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 ctools.module \ctools_preprocess_node()
A theme preprocess function to automatically allow panels-based node templates based upon input when the panel was configured.
File
- ./
ctools.module, line 786 - CTools primary module file.
Code
function ctools_preprocess_node(&$vars) {
// The 'ctools_template_identifier' attribute of the node is added when the pane is
// rendered.
if (!empty($vars['node']->ctools_template_identifier)) {
$vars['ctools_template_identifier'] = check_plain($vars['node']->ctools_template_identifier);
$vars['theme_hook_suggestions'][] = 'node__panel__' . check_plain($vars['node']->ctools_template_identifier);
}
}