Created
April 4, 2012 09:54
-
-
Save anthonyringoet/2300059 to your computer and use it in GitHub Desktop.
cleanup panels-twocol-bricks.tpl.php markup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* cleanup this mess by checking if something exists before printing all the markup surrounding it. | |
*/ | |
?> | |
<div class="panel-display panel-2col-bricks " <?php if (isset($css_id)) { print "id=\"$css_id\""; } ?>> | |
<?php if(!empty($content['top'])): ?> | |
<div class="panel-panel panel-col-top"> | |
<?php print $content['top']; ?> | |
</div> | |
<?php endif; ?> | |
<?php if(!empty($content['left_above']) || !empty($content['right_above']) || !empty($content['middle'])): ?> | |
<div class="center-wrapper"> | |
<?php if(!empty($content['left_above'])): ?> | |
<div class="panel-panel panel-col-first"> | |
<?php print $content['left_above']; ?> | |
</div> | |
<?php endif; ?> | |
<?php if(!empty($content['right_above'])): ?> | |
<div class="panel-panel panel-col-last"> | |
<?php print $content['right_above']; ?> | |
</div> | |
<?php endif; ?> | |
</div> | |
<?php endif; ?> | |
<?php if(!empty($content['middle'])): ?> | |
<div class="panel-panel panel-col-middle"> | |
<?php print $content['middle']; ?> | |
</div> | |
<?php endif; ?> | |
<?php if(!empty($content['left_below']) || !empty($content['right_below']) || !empty($content['bottom'])): ?> | |
<div class="center-wrapper"> | |
<?php if(!empty($content['left_below'])): ?> | |
<div class="panel-panel panel-col-first"> | |
<?php print $content['left_below']; ?> | |
</div> | |
<?php endif; ?> | |
<?php if(!empty($content['right_below'])): ?> | |
<div class="panel-panel panel-col-last"> | |
<?php print $content['right_below']; ?> | |
</div> | |
<?php endif; ?> | |
</div> | |
<?php endif; ?> | |
<?php if(!empty($content['bottom'])): ?> | |
<div class="panel-panel panel-col-bottom"> | |
<?php print $content['bottom']; ?> | |
</div> | |
<?php endif; ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment