twocol.inc

Go to the documentation of this file.
00001 <?php
00002 // $Id: twocol.inc,v 1.6.6.6 2008/09/03 03:43:34 sdboyer Exp $
00003 
00004 /**
00005  * implementation of hook_panels_layouts
00006  */
00007 function panels_twocol_panels_layouts() {
00008   $items['twocol'] = array(
00009     'title' => t('Two column'),
00010     'icon' => 'layouts/twocol.png',
00011     'theme' => 'panels_twocol',
00012     'css' => 'layouts/twocol.css',
00013     'panels' => array(
00014       'left' => t('Left side'),
00015       'right' => t('Right side')
00016     ),
00017   );
00018 
00019   return $items;
00020 }
00021 
00022 /**
00023  * This function uses heredoc notation to make it easier to convert
00024  * to a template.
00025  */
00026 function theme_panels_twocol($id, $content) {
00027   if ($id) {
00028     $idstr = " id='$id'";
00029   }
00030 
00031   $output = <<<EOT
00032 <div class="panel-display panel-2col clear-block" $idstr>
00033   <div class="panel-panel panel-col-first">
00034     <div class="inside">$content[left]</div>
00035   </div>
00036 
00037   <div class="panel-panel panel-col-last">
00038     <div class="inside">$content[right]</div>
00039   </div>
00040 </div>
00041 EOT;
00042   return $output;
00043 }

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