You are here

threecol_25_50_25_stacked.inc in Panels 5

Same filename and directory in other branches
  1. 5.2 layouts/threecol_25_50_25_stacked.inc

File

layouts/threecol_25_50_25_stacked.inc
View source
<?php

/**
 * implementation of hook_panels_layouts
 */
function panels_threecol_25_50_25_stacked_panels_layouts() {
  $items['threecol_25_50_25_stacked'] = array(
    'module' => 'panels',
    'title' => t('Three column 25/50/25 stacked'),
    'icon' => 'layouts/threecol_25_50_25_stacked.png',
    'theme' => 'panels_threecol_25_50_25_stacked',
    'css' => 'layouts/threecol_25_50_25_stacked.css',
    'content areas' => array(
      'top' => t('Top'),
      'left' => t('Left side'),
      'middle' => t('Middle column'),
      'right' => t('Right side'),
      'bottom' => t('Bottom'),
    ),
  );
  return $items;
}

/**
 * This function uses heredoc notation to make it easier to convert
 * to a template.
 */
function theme_panels_threecol_25_50_25_stacked($id, $content) {
  if ($id) {
    $idstr = " id='{$id}'";
  }
  $output = <<<EOT
<div class="panel-3col-stacked" {<span class="php-variable">$idstr</span>}>
  <div class="panel-col-top">
    <div>{<span class="php-variable">$content</span>[<span class="php-string">'top'</span>]}</div>
  </div>
  <div class="panel-col-first">
    <div>{<span class="php-variable">$content</span>[<span class="php-string">'left'</span>]}</div>
  </div>

  <div class="panel-col">
    <div>{<span class="php-variable">$content</span>[<span class="php-string">'middle'</span>]}</div>
  </div>

  <div class="panel-col-last">
    <div>{<span class="php-variable">$content</span>[<span class="php-string">'right'</span>]}</div>
  </div>
  <div class="panel-col-bottom">
    <div>{<span class="php-variable">$content</span>[<span class="php-string">'bottom'</span>]}</div>
  </div>
</div>
<br class="panel-clearer" />
EOT;
  return $output;
}

Functions

Namesort descending Description
panels_threecol_25_50_25_stacked_panels_layouts implementation of hook_panels_layouts
theme_panels_threecol_25_50_25_stacked This function uses heredoc notation to make it easier to convert to a template.