function ctools_preprocess_node in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 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 551 - CTools primary module file.
Code
function ctools_preprocess_node(&$vars) {
// The 'panel_identifier' attribute of the node is added when the pane is
// rendered.
if (!empty($vars['node']->panel_identifier)) {
$vars['panel_identifier'] = check_plain($vars['node']->panel_identifier);
$vars['template_files'][] = 'node-panel-' . check_plain($vars['node']->panel_identifier);
}
}