twocol_bricks.inc

Go to the documentation of this file.
00001 <?php
00002 // $Id: twocol_bricks.inc,v 1.1.2.4 2008/07/18 22:53:51 sdboyer Exp $
00003 
00004 
00005 /**
00006  * @file twocol_bricks.inc
00007  *
00008  * Implementation for the two column bricked layout
00009  */
00010 
00011 /**
00012  * implementation of hook_panels_layouts
00013  */
00014 function panels_twocol_bricks_panels_layouts() {
00015   $items['twocol_bricks'] = array(
00016     'title' => t('Two column bricks'),
00017     'icon' => 'layouts/twocol_bricks.png',
00018     'theme' => 'panels_twocol_bricks',
00019     'css' => 'layouts/twocol_bricks.css',
00020     'panels' => array(
00021       'top' => t('Top'),
00022       'left_above' => t('Left above'),
00023       'right_above' => t('Right above'),
00024       'middle' => t('Middle'),
00025       'left_below' => t('Left below'),
00026       'right_below' => t('Right below'),
00027       'bottom' => t('Bottom'),
00028     ),
00029   );
00030   return $items;
00031 }
00032 
00033 /**
00034  * This function uses heredoc notation to make it easier to convert
00035  * to a template.
00036  */
00037 function theme_panels_twocol_bricks($id, $content) {
00038   if ($id) {
00039     $idstr = " id='$id'";
00040   }
00041 
00042   $output = <<<EOT
00043 <div class="panel-display panel-2col-bricks clear-block" $idstr>
00044   <div class="panel-panel panel-col-top">
00045     <div class="inside">$content[top]</div>
00046   </div>
00047   <div class="center-wrapper">
00048     <div class="panel-panel panel-col-first">
00049       <div class="inside">$content[left_above]</div>
00050     </div>
00051 
00052     <div class="panel-panel panel-col-last">
00053       <div class="inside">$content[right_above]</div>
00054     </div>
00055   </div>
00056   <div class="panel-panel panel-col-middle">
00057     <div class="inside">$content[middle]</div>
00058   </div>
00059   <div class="center-wrapper">
00060     <div class="panel-panel panel-col-first">
00061       <div class="inside">$content[left_below]</div>
00062     </div>
00063 
00064     <div class="panel-panel panel-col-last">
00065       <div class="inside">$content[right_below]</div>
00066     </div>
00067   </div>
00068   <div class="panel-panel panel-col-bottom">
00069     <div class="inside">$content[bottom]</div>
00070   </div>
00071 </div>
00072 EOT;
00073   return $output;
00074 }
00075 

Generated on Sun Sep 5 05:00:14 2010 for Panels 2 by  doxygen 1.5.6