Catching HEAD back up with all the changes on DRUPAL-6--3. Now ready to move forward...
[project/panels.git] / plugins / styles / default.inc
CommitLineData
db205271
EM
1<?php
2// $Id$
3
4/**
26e7b0ef 5 * @file
db205271
EM
6 * Definition of the 'default' panel style.
7 */
8
26e7b0ef
SB
9// Plugin definition
10$plugin = array(
11 'title' => t('No style'),
12 'description' => t('The default panel rendering style; displays each pane with a separator.'),
13 'render panel' => 'panels_default_style_render_panel',
14);
db205271
EM
15
16/**
17 * Render callback.
18 *
19 * @ingroup themeable
20 */
21function theme_panels_default_style_render_panel($display, $panel_id, $panes, $settings) {
22 $output = '';
23
24 $print_separator = FALSE;
25 foreach ($panes as $pane_id => $content) {
26 // Add the separator if we've already displayed a pane.
27 if ($print_separator) {
28 $output .= '<div class="panel-separator"></div>';
29 }
30 $output .= $text = panels_render_pane($content, $display->content[$pane_id], $display);
31
32 // If we displayed a pane, this will become true; if not, it will become
33 // false.
34 $print_separator = (bool) $text;
35 }
36
37 return $output;
38}
39