Skip to content
twocol.inc 874 B
Newer Older
<?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;
}