twocol_stacked.inc in Panels 5.2
File
layouts/twocol_stacked.inc
View source
<?php
function panels_twocol_stacked_panels_layouts() {
$items['twocol_stacked'] = array(
'title' => t('Two column stacked'),
'icon' => 'layouts/twocol_stacked.png',
'theme' => 'panels_twocol_stacked',
'css' => 'layouts/twocol_stacked.css',
'panels' => array(
'top' => t('Top'),
'left' => t('Left side'),
'right' => t('Right side'),
'bottom' => t('Bottom'),
),
);
return $items;
}
function theme_panels_twocol_stacked($id, $content) {
if ($id) {
$idstr = " id='{$id}'";
}
$output = <<<EOT
<div class="panel-2col-stacked clear-block panel-display" {<span class="php-variable">$idstr</span>}>
<div class="panel-col-top panel-panel">
<div class="inside">{<span class="php-variable">$content</span>[<span class="php-string">'top'</span>]}</div>
</div>
<div class="center-wrapper">
<div class="panel-col-first panel-panel">
<div class="inside">{<span class="php-variable">$content</span>[<span class="php-string">'left'</span>]}</div>
</div>
<div class="panel-col-last panel-panel">
<div class="inside">{<span class="php-variable">$content</span>[<span class="php-string">'right'</span>]}</div>
</div>
</div>
<div class="panel-col-bottom panel-panel">
<div class="inside">{<span class="php-variable">$content</span>[<span class="php-string">'bottom'</span>]}</div>
</div>
</div>
EOT;
return $output;
}