onecol.inc
Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008 function panels_onecol_panels_layouts() {
00009 $items['onecol'] = array(
00010 'title' => t('Single column'),
00011 'icon' => 'layouts/onecol.png',
00012 'theme' => 'panels_onecol',
00013 'css' => 'layouts/onecol.css',
00014 'panels' => array('middle' => t('Middle column')),
00015 'settings form' => 'panels_onecol_settings',
00016 );
00017
00018 return $items;
00019 }
00020
00021 function panels_onecol_settings($display, $layout, $settings) {
00022 $form['plain'] = array(
00023 '#type' => 'checkbox',
00024 '#title' => t('Use minimalistic (plain) output'),
00025 '#default_value' => isset($settings['plain']) ? $settings['plain'] : 0,
00026 '#description' => t('Enable this option to output minimal panels display HTML markup.'),
00027 );
00028 return $form;
00029 }
00030
00031
00032
00033
00034
00035 function theme_panels_onecol($id, $content, $settings) {
00036 if ($id) {
00037 $idstr = " id='$id'";
00038 }
00039
00040 if (!empty($settings['plain'])) {
00041 $output = <<<EOT
00042 <div class="panel-display"$idstr>$content[middle]</div>
00043 EOT;
00044 }
00045 else {
00046 $output = <<<EOT
00047 <div class="panel-display panel-1col clear-block"$idstr>
00048 <div class="panel-panel panel-col">
00049 <div>$content[middle]</div>
00050 </div>
00051 </div>
00052 EOT;
00053 }
00054 return $output;
00055 }
00056