How to rearrage breadcrumbs in list page `2-column-left.phtml` alone?
-
30-09-2020 - |
Question
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?
Solution
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; ?>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange