Magento Forum

   
Display Blocks
 
mdumka
Member
 
Avatar
Total Posts:  56
Joined:  2008-02-28
 

Hello ...

I have found this block of code ....

{{block type="catalog/product_list" category_id="6" template="catalog/product/list.phtml"}}

It has come in very handy ... where can I find the list of all of these blocks of code.

Thanks

Mike

 
Magento Community Magento Community
Magento Community
Magento Community
 
mdumka
Member
 
Avatar
Total Posts:  56
Joined:  2008-02-28
 

Nobody ever seen these before?

 
Magento Community Magento Community
Magento Community
Magento Community
 
silent1643
Jr. Member
 
Total Posts:  30
Joined:  2007-11-14
 

i second this request

 
Magento Community Magento Community
Magento Community
Magento Community
 
anthonyfojas
Member
 
Total Posts:  33
Joined:  2008-08-19
 

I havent been able to find an actual list of them, but they are just the classes in the /app/code/core/Mage directory.  The way they are translated is that catalog/product_list becomes /app/code/core/Mage/catalog/block/product/list.php

You can change these w/o editting the actual core files by copying the files to the /app/local directory (ex. /app/code/core/Mage/catalog/block/product/list.php becomes /app/code/local/Mage/catalog/block/product/list.php)

Most of the block types are named so that you can understand what they do, so catalog/product_list will list products in your catalog.

Hope that helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

You can combine any block with a template in this manner (although most aren’t meant to working together rasberry)

But this will generally work for all blocks..(not all take a custom attribute, however - such as category_id="5" )

For instance:
app/code/core/catalog/block/product/view.php matches with app/design/frontend/default/default/template/catalog/product/view.phtml
{{block type="catalog/product_view" template="catalog/produst/view.phtml" }}

app/code/core/checkout/block/cart/sidbar.php matches with app/design/frontend/default/default/template/checkout/cart/sidebar.phtml
{{block type="checkout/cart_sidebar" template="checkout/cart/sidebar.phml" }}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top