clare485
6/10/2013 - 10:19 AM

Useful magento template and cms code

Useful magento template and cms code

Interakting slider bug
Code/Community/BusinessDecision/Slide.php 
comment out:
//$vs_Content = str_replace(array("\r\n", "\n", "\r"),'',$vs_Content);
  	//$vs_Content = addslashes($vs_Content);images', $vs_Skin);

Template
Load static block into template:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('callout-1')->toHtml() ?>

Xml
Load static block into template:
<block type="cms/block" name="cms_test_block">
                <action method="setBlockId"><block_id>test_block</block_id></action>
            </block>


How to display one category on homepage
Eg new products or featured category
http://www.magentocommerce.com/wiki/groups/248/display_products_on_home_page
CMS
How to display category on homepage, and limit number of items in the category:
{{block type="catalog/product_list" name="product_list" category_id="3" column_count="6" count="6" limit="4" mode="grid" template="catalog/product/list.phtml"}}