function 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

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);
    }
}