0

I want to display the breadcrumbs under col-main div instead of main in list page alone. Not in all pages that uses the two-column-left layout. Is that possible?

2

make following changes to the 2-columns-left.phtml

<?php $layout_handle = Mage::app()->getLayout()->getUpdate()->getHandles(); ?>
<?php if(in_array('catalog_category_view',$layout_handle)): ?>
    <div class="main">
        <?php // This left_first block will display above the main content on smaller viewports ?>
        <?php if ($_leftContent = $this->getChildHtml('left_first')): ?>
            <div class="col-left sidebar col-left-first"><?php echo $_leftContent;   ?></div>
        <?php endif; ?>
        <div class="col-main">
            <?php echo $this->getChildHtml('breadcrumbs') ?>
            <?php echo $this->getChildHtml('global_messages') ?>
            <?php echo $this->getChildHtml('content') ?>
        </div>
        <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
    </div>
<?php else: ?>
    <div class="main">
        <?php echo $this->getChildHtml('breadcrumbs') ?>
        <?php // This left_first block will display above the main content on smaller viewports ?>
        <?php if ($_leftContent = $this->getChildHtml('left_first')): ?>
            <div class="col-left sidebar col-left-first"><?php echo $_leftContent;   ?></div>
        <?php endif; ?>
        <div class="col-main">
            <?php echo $this->getChildHtml('global_messages') ?>
            <?php echo $this->getChildHtml('content') ?>
        </div>
        <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
    </div>
<?php endif; ?>
  • syntax error, unexpected ':', expecting '(' is getting displayed. – Ramya Jun 29 '16 at 9:10
  • I found a solution. its not elseif its just else. if we use elseif we have to use another condition to check. And that is exactly the error indicates. – Ramya Jun 29 '16 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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