AW Blog. How to show blog category from block?

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" id="1" template="aw_blog/cat.phtml"}}

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

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

to

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

Tags: , ,

2 Responses to “AW Blog. How to show blog category from block?”

  1. Toby says:

    This is a crafty solution that worked well for me. Thanks for the excellent support!

  2. Shane says:

    This is working well.
    Thanks :)

Leave a Reply