0

In my project, I added 2column-left layout to the home page through CMS as discussed here.

enter image description here

As shown in the above image, I am trying to remove the red lined section from the green lined section which has class name as col-main.

I know how to remove blocks through updation layouts but this is some kind of different. there is no template file which holds the red lined block.

Here is the excerpt code from 2columns-left.phtml :

<div class="col-main">
     <?php echo $this->getChildHtml('global_messages') ?>
     <?php echo $this->getChildHtml('content') ?>
</div>

If I remove the content block from the above code then nothing is changing and if I remove global_messages complete green lined section is being removed which I absolutely don't want.

I even tried to search for the template files holding by the above blocks in page.xml. but they don't hold any template file.. (weird).

Here is the page.xml excerpt code:

<block type="core/messages" name="global_messages" as="global_messages"/>
<block type="core/messages" name="messages" as="messages"/>

<block type="core/text_list" name="content" as="content" translate="label">
    <label>Main Content Area</label>
</block>

Not sure what is happening here..

Any help?

EDIT: I have seen just now that the content is in CMS. but will modifying CMS content will effect future magento upgrades?

Any other better way?

2 Answers 2

1
  1. Login to admin-end
  2. Go to CMS -> Pages -> click on home page (status = enabled)
  3. click on content
  4. Remove Below code

<p class="home-callout"><a href="{{store direct_url="apparel/shoes/womens/anashria-womens-premier-leather-sandal.html"}}"><img src="{{skin url='images/ph_callout_left_top.gif'}}" alt="" border="0" /></a></p> <p class="home-callout"><img src="{{skin url='images/ph_callout_left_rebel.jpg'}}" alt="" border="0" /></p>

2
  • This is the same which I asked in the edit section of my post.. is this good to do this? I am asking so, because I think this will effect future upgrades of magento.. or am I wrong? please explain..
    – Mr_Green
    Oct 9, 2013 at 16:14
  • Yes, you can change the content of any cms page from admin-end. Magento knows that most of the store owners will change look and feel of home page that's why they are using cms home page, so that any one can modify according to their need. AS YOU SAY FUTURE UPGRADES - DON'T DO ANY CHANGES DIRECTLY IN CORE FILES. from admin-end feel free to change anything anytime. Oct 10, 2013 at 3:20
0

This is the most kept secret in magento community, how to disable banners ;)

In the file app/design/frontend/base/default/layout/catalog.xml

Remove the following lines to remove it:

<reference name="left">
    <block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
        <action method="setImgSrc">
            <src>images/media/col_left_callout.jpg</src>
        </action>
        <action method="setImgAlt" translate="alt" module="catalog">
            <alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt>
        </action>
        <action method="setLinkUrl">
            <url>checkout/cart</url>
        </action>
    </block>
</reference>
<reference name="right">
    <block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml" />
    <block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
        <action method="setImgSrc">
            <src>images/media/col_right_callout.jpg</src>
        </action>
        <action method="setImgAlt" translate="alt" module="catalog">
            <alt>Keep your eyes open for our special Back to School items and save A LOT!</alt>
        </action>
    </block>
</reference>

Its the lines 48 - 61 in magento 1.7.0.2

Edit: Ok you meant to change the number of columns Within the catalog.xml (same as above) within the tags <catalog_category_default translate="label"> and <catalog_category_layered translate="label"> add the following on an empty line: <update handle="page_one_column" />

All the different handles for that are found inside page.xml

Your Answer

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

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