function panels_render_pane in Panels 6.3
Same name and namespace in other branches
- 5.2 panels.module \panels_render_pane()
- 6.2 includes/display-render.inc \panels_render_pane()
Render a pane using the appropriate style.
Legacy function; this behavior has been moved onto the display renderer object. The function name here is included for backwards compatibility. New style plugins should NEVER call it.
$content The already rendered content via panels_render_pane_content() $pane The $pane information from the display $display The display.
1 call to panels_render_pane()
- panels_renderer_legacy::render_region in plugins/
display_renderers/ panels_renderer_legacy.class.php - Render a single panel region.
File
- includes/
display-render.inc, line 48 - Contains Panels display rendering functions.
Code
function panels_render_pane($content, $pane, &$display) {
if ($display->hide_title == PANELS_TITLE_PANE && !empty($display->title_pane) && $display->title_pane == $pane->pid) {
// If the user selected to override the title with nothing, and selected
// this as the title pane, assume the user actually wanted the original
// title to bubble up to the top but not actually be used on the pane.
if (empty($content->title) && !empty($content->original_title)) {
$display->stored_pane_title = $content->original_title;
}
else {
$display->stored_pane_title = !empty($content->title) ? $content->title : '';
}
}
if (!empty($content->content)) {
if (!empty($pane->style['style'])) {
$style = panels_get_style($pane->style['style']);
if (isset($style) && isset($style['render pane'])) {
$output = theme($style['render pane'], $content, $pane, $display, $style);
// This could be null if no theme function existed.
if (isset($output)) {
return $output;
}
}
}
// fallback
return theme('panels_pane', $content, $pane, $display);
}
}