Reputation: 4285
On the homepage I am using the following code to display a few products from a specific category:
{{block type="catalog/product_list" category_id="213" column_count="6" template="catalog/product/list.phtml"}}
Is there a block I can use to also render the category description via a CMS page or block?
Upvotes: 2
Views: 6040
Reputation: 15206
There is no built in functionality for this, but you can add a block yourself. Add this in the homepage content:
{{block type="core/template" template="catalog/category/description.phtml" category_id="213"}}
Now create the file app/design/frontend/{interface}/{theme}/template/catalog/category/description.phtml
with the following content
<?php $categoryId = $this->getCategoryId();?>
<?php $category = Mage::getModel('catalog/category')->setStoreId(Mage::app()->getStore()->getId())->load($categoryId);?>
<?php if ($category->getId() && $category->getIsActive() && $_description = $category->getDescription()) : ?>
<?php echo $this->helper('catalog/output')->categoryAttribute($category, $_description, 'description')?>
<?php endif;?>
Upvotes: 5