0

I am trying to modify one column layout on my custom theme by adding menu block from two column (left bar layout) in Magento 1.9. I added a snippet of advancedmenu block from column layout from 2 column layout. But it goes in the bottom. I am expecting an output similar like this. How do I place advancedmenu block properly so that both of them come next to each other? How do I do that?

enter image description here

2columns-left.phtml

<div class="wrapper">
<?php echo $this->getChildHtml('global_notices') ?>
<div class="page">
    <?php echo $this->getChildHtml('header') ?>
    <?php echo $this->getChildHtml('home_content') ?>
    <section class="main-container col2-left-layout  container-width">
        <div class="main"> 
        <div class="column-left-breadcrumbs">
            <div class="breadcumb-main">
        <?php echo $this->getChildHtml('breadcrumbs') ?>
        </div>
        </div>
        <div class="col-main-left">
            <article class="col-main">

                <?php echo $this->getChildHtml('global_messages') ?>
                <?php echo $this->getChildHtml('content') ?>
            </article>
            <aside class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></aside>
            </div>
        </div>
    </section>
    <?php echo $this->getChildHtml('footer') ?>
    <?php echo $this->getChildHtml('before_body_end') ?>
</div>

1-column2.phtml(i cloned one column layout)

<div class="wrapper">
<?php echo $this->getChildHtml('global_notices') ?>
<div class="page">
    <?php echo $this->getChildHtml('header') ?>
    <?php echo $this->getChildHtml('home_content') ?>
    <section class="main-container col1-layout">
        <div class="main">
        <div class="column-left-breadcrumbs"> <div class="breadcumb-main">    
                        <?php echo $this->getChildHtml('breadcrumbs') ?>
        </div>
        </div>

            <article class="col-main"> 

                <?php echo $this->getChildHtml('global_messages') ?>
                <?php echo $this->getChildHtml('content') ?>
            </article>
            <aside class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></aside>

        </div>
    </section>
    <?php echo $this->getChildHtml('footer') ?>
    <?php echo $this->getChildHtml('before_body_end') ?>
</div>

enter image description here

Currently this is how it look on two column layout, but i want to incorporate within one column layout. Please suggest how to do that? enter image description here

1

Add custom class OR add col2-left-layout class in section tag. See the difference below in your section tag:

<section class="main-container col2-left-layout  container-width">

<section class="main-container col1-layout">
3
  • I am adding the code. There are some bugs in it. I shall revert back solving some layout issues. – Srinath Naidu Jun 6 '18 at 13:50
  • It was not the exactly the answer I was looking for. But it did give me clue to solve the issue. Thanks – Srinath Naidu Jun 8 '18 at 11:17
  • Good explanation. +1 – Shoaib Munir Mar 14 '19 at 6:00

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.