public function getPosts() { $collection = parent::_prepareCollection(); $tag = $this->getRequest()->getParam('tag'); if ($tag) { $collection->addTagFilter(urldecode($tag)); } parent::_processCollection($collection); return $collection; }
public function getPosts() { $category = $this->getCategory(); if (!$category->getCatId()) { return false; } $collection = parent::_prepareCollection()->addCatFilter($category->getCatId()); parent::_processCollection($collection, $category); return $collection; }