All about Magento E-commerce Store.......MagentoForum: Block Remove
Showing posts with label Block Remove. Show all posts
Showing posts with label Block Remove. Show all posts

Thursday, July 7, 2011

How to change blocks order in Magento

This tutorial will show you how to change the modules order in Magento. The modules order is defined in the xml files from the app/design/frontend/default/theme###/layout directory.

Each block has an option "before" or "after" where you can define the block name that will be after or before the module you edit.

For example you want the Shop By block be displayed after the My Cart module.

Edit catalog.xml file:

  <block type="catalog/layer_view" name="catalog.leftnav" after="cart_sidebar" template="catalog/layer/view.phtml"/> 





How to manage home page sidebar blocks

This tutorial will show you how to manage the sidebar blocks in Magento.

 

Home Page blocks.

Home page blocks in Magento are controlled by the Magento administration panel. So all change should be done there.

1. Open Magento admin panel

2. Go to CMS > Pages > Home Page

3. Open the Design tab, in the Layout Update XML field you can see the home page blocks code.

 

Here are some examples:

 

Popular Tags block

   <block  type="tag/popular" name="tags_popular"  template="tag/popular.phtml"/> 

 

Community Poll block

   <block  type="poll/activePoll" name="right.poll">   <action method="setPollTemplate"><template>poll/active.phtml</template><type>poll</type></action>   <action method="setPollTemplate"><template>poll/result.phtml</template><type>results</type></action>   </block> 

 

Newsletter Sign-Up block

   <block  type="newsletter/subscribe" name="left.newsletter"  template="newsletter/subscribe.phtml"/> 

 

Sidebar callout(banner) block

 <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>iPod  classic</alt></action>   <action  method="setLinkUrl"><url>storage.html</url></action>   </block> 

 

You can change the blocks order or delete any of the blocks editing the XML code.





Saturday, February 26, 2011

Turning off Magento Blockes

When customizing your Magento store, one of the first things everyone wants to do is to turn off some of the
default functionality and modules. Out of the tarball, Magento has most of its functionality turned on so that it's
available, but some will not be applicable to your store. This article summarizes how to turn off some of default modules and blocks of content, like the callout banners in the right and left columns, or the poll, or newsletter signup.
The general process we recommend when starting to customize your Magento store is to start simple and move up to more complex solutions only if you need to. To ensure the best upgrade path and most stable behavior,
follow this approach when customizing:
1. Can you disable or customize the feature/module using the Admin Panel?
2. Can you disable or customize the feature/module using the layout (xml) files & CSS?
3. Can you disable or customize the feature/module using the template (phtml) files & CSS?
4. Do you have to write a custom module or local extension?
This article covers how to turn off some of the most commonly modified blocks and modules on your Magento website using the Admin Panel and your custom theme’s xml files (steps 1 & 2 above). It doesn’t provide every bit of code but should point you in the right direction for some of the most common elements. Guidance here will vary based on what version of Magento and what theme is being used, so we’ve tried to explain the general approach then you can adapt the specific admin fields or code snippets depending on your theme and version of Magento.