Categories

Featured templates

Locating Magento sidebar modules

Chris Diaz May 19, 2011
Rating: 3.8/5. From 4 votes.
Please wait...

This tutorial will show you where you can find the sidebar modules code.

Open app\design\frontend\default\your_theme\layout. This directory contains the XML files that determine the modules positions and order. Open any XML file and search for the tag <reference>. The reference tags determine modules position for various pages of your Magento store.

As you can see there are several references like: <reference name="top.menu">, <reference name="left">, <reference name="right">, <reference name="footer_links"> etc.

Let’s see where you can find most used sidebar modules Magento modules.

 

Compare products

File: catalog.xml

  <block  type="catalog/product_compare_sidebar"  before="cart_sidebar" name="catalog.compare.sidebar"  template="catalog/product/compare/sidebar.phtml"/>

 

Shop By/Browse By

File: catalog.xml

  <block  type="catalog/navigation" name="catalog.leftnav"  before="-" template="catalog/navigation/left.phtml"/>

 

Product Viewed

File: catalog.xml

  <block  type="reports/product_viewed"  before="right.permanent.callout"  name="left.reports.product.viewed"  template="reports/product_viewed.phtml" />

 

Related Products

File: catalog.xml

<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
	<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
    	<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
        	<block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
            	<label>Shopping Cart Sidebar Extra Actions</label>
            </block>
    </block>

 

My Cart

File: checkout.xml

	<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
    	<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
        	<label>Shopping Cart Sidebar Extra Actions</label>
        </block>
    </block>

 

Community Poll

File: poll.xml

<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>

 

Popular Tags

File: tag.xml

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

 

PayPal logo

File: paypal.xml

<block type="paypal/logo" name="paypal.partner.right.logo" template="paypal/partner/logo.phtml"/>

 

Newsletter

File: newsletter.xml

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

 

 

Magento Themes
This entry was posted in Magento, Magento Tutorials and tagged Magento, module, sidebar, XML. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket