Newer
Older
Earl Miles
committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* implementation of hook_panels_layouts
*/
function panels_twocol_panels_layouts() {
$items['twocol'] = array(
'module' => 'panels',
'path' => 'layouts',
'title' => t('Two column alt'),
'icon' => 'layouts/twocol.png',
'theme' => 'panels_twocol',
'css' => 'layouts/twocol.css',
'content areas' => array('left' => t('Left side'), 'right' => t('Right side')),
);
return $items;
}
/**
* This function uses heredoc notation to make it easier to convert
* to a template.
*/
function theme_panels_twocol($id, $content) {
if ($id) {
$idstr = " id='$id'";
}
$output = <<<EOT
<div class="panel-2col" $idstr>
<div class="panel-col-first">
$content[left]
</div>
<div class="panel-col-last">
$content[right]
</div>
</div>
<br clear="both" />
EOT;
return $output;
}