In the theme function of Panels are the following variables defined:
$theme['panels_pane'] = array(
'variables' => array(
'output' => array(),
'pane' => array(),
'display' => array()
),
);
But in the the template_preprocess_panels_pane() function is the content expected in $vars['content'].
So, if a other theme function (maybe a style plugin) call the "panels_pane" theme function all works:
return theme('panels_pane', array('content' => $vars['content'], 'pane' => $vars['pane'], 'display' => $vars['display']));
But if the style plugin use a render array instead, the rendered pane is empty:
$pane = array(
'#theme' => 'panels_pane',
'#output' => 'Test Output',
'#pane' => $vars['pane'],
'#display' => $vars['display'],
);
$output = drupal_render($pane);
The problem is, that the theme() function only pass the arguments to the theme function, which are expected (in this case "output"). This behavior is only, if theme() is called from within a render array. This is also the reason why theme('panels_pane', array(...)) works and with drupal_render() not.
Comments
Comment #1
cbeier commentedThe patch corrects the name of the variables key.
Comment #2
niko- commentedHi
Thanks @cbeier , patch #1 works for me
RTBC
Comment #3
kristiaanvandeneyndeLooks good to me.
Comment #4
japerryThanks everyone! Fixed.