Beispiel #1
0
 public function getPosts()
 {
     $collection = parent::_prepareCollection();
     if ($tag = $this->getRequest()->getParam('tag')) {
         $collection->addTagFilter(urldecode($tag));
     }
     parent::_processCollection($collection);
     return $collection;
 }
Beispiel #2
0
 public function getPosts()
 {
     $category = $this->getCategory();
     if (!$category->getCatId()) {
         return false;
     }
     $collection = parent::_prepareCollection()->addCatFilter($category->getCatId());
     parent::_processCollection($collection, $category);
     return $collection;
 }
Beispiel #3
0
 public function getPosts()
 {
     $cats = Mage::getSingleton('blog/cat');
     if ($cats->getCatId() === NULL) {
         return false;
     }
     $collection = parent::_prepareCollection(array('addCatFilter' => $cats->getCatId()));
     parent::_processCollection($collection, $categoryMode = true);
     return $collection;
 }
 public function getPosts()
 {
     $collection = parent::_prepareCollection();
     $post = Mage::app()->getRequest()->getParams();
     if (isset($post['tag'])) {
         $collection->addTagFilter(urldecode($post['tag']));
     } elseif (isset($post['q'])) {
         $collection->addSearchFilter(urldecode($post['q']));
     } elseif (isset($post['y']) && isset($post['m'])) {
         $collection->addArchiveFilter(urldecode($post['m']), urldecode($post['y']));
     }
     parent::_processCollection($collection);
     return $collection;
 }
Beispiel #5
0
 public function getPosts()
 {
     $cats = Mage::getSingleton('blog/cat');
     if ($cats->getCatId() === NULL) {
         return false;
     }
     $collection = parent::_prepareCollection(array('addCatFilter' => $cats->getCatId()));
     $pageSize = (int) Mage::getStoreConfig('blog/blog/perpage');
     if ($pageSize != 0) {
         $pager = $this->getLayout()->createBlock('page/html_pager', 'blog.pager');
         $pager->setLimit($pageSize);
         $pager->setTemplate('aw_blog/pager/list.phtml');
         $pager->setCollection($collection);
         $this->setChild('pager', $pager);
     }
     parent::_processCollection($collection, $categoryMode = true);
     return $collection;
 }
Beispiel #6
0
 public function getPosts()
 {
     $collection = parent::_prepareCollection();
     if ($tag = $this->getRequest()->getParam('tag')) {
         $collection->addTagFilter(urldecode($tag));
     }
     $pageSize = (int) Mage::getStoreConfig('blog/blog/perpage');
     if ($pageSize != 0) {
         if ($this->getLayout()) {
             $pager = $this->getLayout()->createBlock('page/html_pager', 'blog.pager');
             $pager->setLimit($pageSize);
             $pager->setTemplate('aw_blog/pager/list.phtml');
             $pager->setCollection($collection);
             $this->setChild('pager', $pager);
         }
     }
     parent::_processCollection($collection);
     return $collection;
 }