You are here

function panels_print_layout in Panels 5.2

Same name and namespace in other branches
  1. 8.3 panels.module \panels_print_layout()
  2. 5 panels.module \panels_print_layout()
  3. 6.3 panels.module \panels_print_layout()
  4. 6.2 panels.module \panels_print_layout()
  5. 7.3 panels.module \panels_print_layout()

For external use: Given a layout ID and a $content array, return the panel display. The content array is filled in based upon the content available in the layout. If it's a two column with a content array defined like array('left' => t('Left side'), 'right' => t('Right side')), then the $content array should be array('left' => $output_left, 'right' => $output_right)

File

./panels.module, line 948
panels.module Core API for Panels. Provides display editing and rendering capabilities.

Code

function panels_print_layout($id, $content) {
  panels_load_include('plugins');
  $layout = panels_get_layout($id);
  if (!$layout) {
    return;
  }
  return panels_render_layout($layout, $content);
}