문제

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?

도움이 되었습니까?

해결책

  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>

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top