4

i have made a custom theme "Custom_stark" and made changes into .info file and added the triptychs

regions[triptych_first] = Triptych first
regions[triptych_middle] = Triptych middle
regions[triptych_last] = Triptych last

in Custom_stark.info.

But when I see with block " Demonstrate block regions (Custom_stark) "

i can see only in this default format. enter image description here

And how can i get the triptych in desired format mention in below image

enter image description here

And below is the code for page.tpl.php

<?php if ($page['triptych_first'] || $page['triptych_middle'] || $page['triptych_last']): ?>
    <div id="triptych-wrapper"><div id="triptych" class="clearfix">
      <?php print render($page['triptych_first']); ?>      
  <?php print render($page['triptych_middle']); ?>
  <?php print render($page['triptych_last']); ?>
</div></div> <!-- /#triptych, /#triptych-wrapper -->

1 Answer 1

2

Try this

 <?php if ($page['triptych_first'] || $page['triptych_middle'] || $page['triptych_last']): ?>
   <div id="triptych-wrapper">
      <div id="triptych" class="clearfix">
         <div style="float: left; width: 25%;">
            <?php print render($page['triptych_first']); ?>      
         </div>
         <div style="float: left; width: 50%;">
            <?php print render($page['triptych_middle']); ?>
         </div>
         <div style="float: right; width: 25%;">
            <?php print render($page['triptych_last']); ?>
         </div>
         <div style="clear: both;"></div>
      </div>
   </div>
1
  • I modified the code as mention, and i believe this div's not gonna be off exact size. The triptych_middle takes area of 50% which is larger than other two. And i manually changes the value but could not get the divs in above format...
    – Rafee
    Oct 25, 2011 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.