When using the AheadWorks Blog Magento Extensions sometimes necessary show blog category from block or cms page. Need to make small changes before use code

{{block type="blog/cat" categories="1" template="aw_blog/cat.phtml"}}

Go to app/code/community/AW/Blog/Block/Cat.php and change

public function getCategory()
{
	$cats = Mage::getSingleton('blog/cat');
	return $cats;
}

to

public function getCategory()
  {
  $cats = Mage::getSingleton('blog/cat');
 $cats = Mage::getSingleton('blog/cat');
	  $_id = ($this->getData('categories')) ? $this->getData('categories') : false;
	  if (!empty($_id)) {
		$cats->load($_id);
	  }
	  return $cats;
}

3 Comments on “Show posts from a category magento AW BLog

  1. klaus
    August 6, 2014

    Thank you very much! From South Africa

  2. priya kumar
    October 26, 2015

    its useful

  3. suman
    November 28, 2015

    i want to know to to listed category wise product in custom template

Leave a Reply

Your email address will not be published. Required fields are marked *