Hi,

is there a way to use a Gpanel multiple times? In my case I want to use the 3-column Gpanel in the header and the footer. Following the documentation, I copied the snippets in the page.tpl.php. Then I recognized that the regions have the same names.

Is there any solution?

Comments

Sorry, but no its not possible, you can create more gpanels by copying the original and renaming things and putting it in your theme - if you can figure this out its one way. The other way is to use Panels, then you can have as many as you like.

Thx for your fast reply.

But I cannot rename the name in the render part or?

<?php
print render($page['two_33_66_top']);
?>

If I replace "two_33_66_top" with "footer_top" the Gpanel will not be rendered. Or what do you mean with "renaming" ?

In this case all the CSS definitions of the two_33_66 is gone and I have to define the properties for my new GPanel manually

Hello Jeff,

I am stuck with the same question...

Jeff, please have a look at my solution for the Adaptivetheme GPanels which go into e.g. page.tpl.php. Works for me at first sight...is this a valid solution?

Region Deinitions:
; 3 col 50-25-25
regions[CustomPrefix_three_50_25_25_top]    = AT CustomPrefix Three column 50/25/25 - top
regions[CustomPrefix_three_50_25_25_first]  = AT CustomPrefix Three column 50/25/25 - left
regions[CustomPrefix_three_50_25_25_second] = AT CustomPrefix Three column 50/25/25 - center
regions[CustomPrefix_three_50_25_25_third]  = AT CustomPrefix Three column 50/25/25 - right
regions[CustomPrefix_three_50_25_25_bottom] = AT CustomPrefix Three column 50/25/25 - bottom
*/
?>
<!-- Three column 50-25-25 -->
<?php if (
 
$page['CustomPrefix_three_50_25_25_top'] ||
 
$page['CustomPrefix_three_50_25_25_first'] ||
 
$page['CustomPrefix_three_50_25_25_second'] ||
 
$page['CustomPrefix_three_50_25_25_third'] ||
 
$page['CustomPrefix_three_50_25_25_bottom']
  ):
?>

  <div class="at-panel gpanel panel-display three-50-25-25 clearfix">
    <div class="region region-three_50_25_25_top">
    <?php print render($page['CustomPrefix_three_50_25_25_top']); ?>
    </div>
    <div class="region region-three_50_25_25_first">
    <?php print render($page['CustomPrefix_three_50_25_25_first']); ?>
    </div>
    <div class="region region-three_50_25_25_second">
    <?php print render($page['CustomPrefix_three_50_25_25_second']); ?>
    </div>
    <div class="region region-three_50_25_25_third">
    <?php print render($page['CustomPrefix_three_50_25_25_third']); ?>
    </div>
    <div class="region region-three_50_25_25_bottom">
    <?php print render($page['CustomPrefix_three_50_25_25_bottom']); ?>
    </div>
  </div>
<?php endif; ?>

PS: Guess I have to add another class so highlighting text with regions will work...have to figure this out. There is also 1 exception to my solution. The TOP and BOTTOM regions will not work since the class="region" after the class="region-conditional-stack" effects the regions layout.

Found a solution for the TOP and BOTTOM region. You just need to add 1 CSS rule as override!

page.tpl.php

Region Deinitions:
; 3 col 50-25-25
regions[CustomPrefix_three_50_25_25_top]    = AT CustomPrefix Three column 50/25/25 - top
regions[CustomPrefix_three_50_25_25_first]  = AT CustomPrefix Three column 50/25/25 - left
regions[CustomPrefix_three_50_25_25_second] = AT CustomPrefix Three column 50/25/25 - center
regions[CustomPrefix_three_50_25_25_third]  = AT CustomPrefix Three column 50/25/25 - right
regions[CustomPrefix_three_50_25_25_bottom] = AT CustomPrefix Three column 50/25/25 - bottom
*/
?>
<!-- Three column 50-25-25 -->
<?php if (
 
$page['CustomPrefix_three_50_25_25_top'] ||
 
$page['CustomPrefix_three_50_25_25_first'] ||
 
$page['CustomPrefix_three_50_25_25_second'] ||
 
$page['CustomPrefix_three_50_25_25_third'] ||
 
$page['CustomPrefix_three_50_25_25_bottom']
  ):
?>

  <div class="at-panel gpanel panel-display three-50-25-25 clearfix">
    <div class="region region-three-50-25-25-top region-conditional-stack">
    <?php print render($page['CustomPrefix_three_50_25_25_top']); ?>
    </div>
    <div class="region region-three_50_25_25_first">
    <?php print render($page['CustomPrefix_three_50_25_25_first']); ?>
    </div>
    <div class="region region-three_50_25_25_second">
    <?php print render($page['CustomPrefix_three_50_25_25_second']); ?>
    </div>
    <div class="region region-three_50_25_25_third">
    <?php print render($page['CustomPrefix_three_50_25_25_third']); ?>
    </div>
    <div class="region region-three-50-25-25-bottom region-conditional-stack">
    <?php print render($page['CustomPrefix_three_50_25_25_bottom']); ?>
    </div>
  </div>
<?php endif; ?>

custom.css

.region-conditional-stack .region {
float: none;
display: block;
clear: both;
width: 100%;
}

This will prevent the CSS rule ".at-panel .region {...};" to effect the TOP and BOTTOM div!