Exemplo n.º 1
0
 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     $brand_id = Mage::app()->getRequest()->getParam('id');
     $branddetail = $this->helper('designer')->getBrandDetails($brand_id);
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         $genseo = 1;
         if ($genseo == 1) {
             $headBlock->setTitle($branddetail['designer_name'] . ' Products: Buy Online ' . $branddetail['designer_name'] . ' Products, Deals, Offers, Discounts - Zoffio');
             $mehyphen = "-";
             //$headBlock->setDescription("Zoffio presents a wide range of products by ".$branddetail['designer_name']." such as ".$mehyphen." Top Selling Products and more. Cash on delivery & free shipping available.");
             $headBlock->setDescription($branddetail['designer_name'] . ' Products: Buy Online ' . $branddetail['designer_name'] . ' Products at Wholesale Rate - Best deals and special offers on ' . $branddetail['designer_name'] . ' at Zoffio.com, an online shopping store.');
             $headBlock->setKeywords($branddetail['designer_name'] . ' Products, ' . $branddetail['designer_name'] . '  Products at Wholesale Rate, ' . $branddetail['designer_name'] . ' Product Deals, ' . $branddetail['designer_name'] . ' Product Offers, ' . $branddetail['designer_name'] . ' Product Discounts, Buy Online ' . $branddetail['designer_name'] . ' Products');
         } else {
             if ($branddetail['meta_title'] !== "") {
                 //$headBlock->setTitle($branddetail['meta_title']);
                 $headBlock->setTitle('Buy ' . $branddetail['designer_name'] . ' Products Online in India | Zoffio');
             }
             if ($branddetail['meta_descr'] !== "") {
                 //$headBlock->setDescription($branddetail['meta_descr']);
                 $headBlock->setDescription('Zoffio presents a wide range of products by ' . $branddetail['designer_name'] . ' such as – Top Selling Products and more. Cash on delivery & free shipping available.');
             }
             if ($branddetail['meta_tags'] != "") {
                 // $headBlock->setKeywords($branddetail['meta_tags']);
                 $headBlock->setKeywords('buy ' . $branddetail['designer_name'] . ' products online,' . $branddetail['designer_name'] . ' products India,order' . $branddetail['designer_name'] . ' products online,office supplies store india, zoffio');
             }
         }
     }
     return $this;
     //return parent::_prepareLayout();
 }
 public function delayedPrepareLayout()
 {
     $layer = $this->getLayer();
     if ($this->getShowRootCategory()) {
         $this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
     }
     if (Mage::registry('product')) {
         $categories = Mage::registry('product')->getCategoryCollection()->setPage(1, 1)->load();
         if ($categories->count()) {
             $this->setCategoryId(current($categories->getIterator()));
         }
     }
     $origCategory = null;
     if ($this->getCategoryId()) {
         $category = Mage::getModel('catalog/category')->load($this->getCategoryId());
         if ($category->getId()) {
             $origCategory = $layer->getCurrentCategory();
             $layer->setCurrentCategory($category);
         }
         $categoryId = $this->getCategoryId();
     } else {
         $categoryId = Mage::app()->getStore()->getRootCategoryId();
     }
     $this->_prepareProductCollection($layer->getProductCollection(), $categoryId);
     if ($origCategory) {
         $layer->setCurrentCategory($origCategory);
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 3
0
 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'history_pager')->setCollection($this->getCollection());
     $this->setChild('history_pager', $pager);
     return $this;
 }
Exemplo n.º 4
0
 protected function _prepareLayout()
 {
     $title = $this->getHeaderText();
     $this->getLayout()->getBlock('head')->setTitle($title);
     $this->getLayout()->getBlock('root')->setHeaderTitle($title);
     return parent::_prepareLayout();
 }
Exemplo n.º 5
0
 protected function _prepareLayout()
 {
     if ($this->getIsEmail()) {
         $this->setTemplate('downloads/email_file_links.phtml');
     }
     $title = trim($this->getTitle());
     if (empty($title)) {
         $this->setTitle(Mage::helper('downloads')->getFileDownloadsTitle());
     }
     $id = $this->getId();
     if (empty($id) && $this->getIds()) {
         $id = implode(',', $this->getIds());
     }
     if (empty($id)) {
         return '';
     } else {
         $ids = explode(',', $id);
         $files = Mage::getResourceModel('downloads/files_collection');
         $files->addResetFilter()->addFilesFilter($ids)->addStatusFilter()->addCategoryStatusFilter()->addStoreFilter()->addSortOrder();
         $items = $files->getItems();
         foreach ($items as $k => $item) {
             if (!Mage::helper('downloads')->checkCustomerGroupAccess($item) && Mage::helper('downloads')->isHideFiles()) {
                 unset($items[$k]);
             }
         }
         if (Mage::helper('downloads')->getGroupByCategory()) {
             $items = $this->groupFiles($items);
         }
         $this->setItems($items);
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 6
0
 protected function _prepareLayout()
 {
     $category = $this->getCurrentCategory();
     $route = Mage::helper('blog')->getRoute();
     $isBlogPage = Mage::app()->getFrontController()->getAction()->getRequest()->getModuleName() == 'blog';
     // show breadcrumbs
     if ($isBlogPage && Mage::getStoreConfig('blog/info/blogcrumbs') && ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'))) {
         $breadcrumbs->addCrumb('home', array('label' => Mage::helper('blog')->__('Home'), 'title' => Mage::helper('blog')->__('Go to Home Page'), 'link' => Mage::getUrl('blog')));
         $breadcrumbs->addCrumb('blog', array('label' => Mage::getStoreConfig('blog/info/title'), 'title' => Mage::helper('blog')->__('Return to ' . Mage::getStoreConfig('blog/info/title')), 'link' => Mage::getUrl($route)));
         if ($category) {
             $catNames = array();
             while ($category->getId() != Mage::getStoreConfig('blog/info/root_category_id')) {
                 $catNames[] = $category;
                 $category = Mage::getModel('blog/category')->load($category->getParentId());
             }
             $catNames = array_reverse($catNames);
             $link = "";
             $i = 0;
             foreach ($catNames as $c) {
                 if ($i == count($catNames) - 1) {
                     $breadcrumbs->addCrumb('blog_cat_' . $c->getId(), array('label' => $c->getName(), 'title' => $c->getName()));
                 } else {
                     $breadcrumbs->addCrumb('blog_cat_' . $c->getId(), array('label' => $c->getName(), 'title' => $c->getName(), 'link' => Mage::getUrl('blog') . $link . $c->getUrlKey() . '.html'));
                 }
                 $link .= $c->getUrlKey() . '/';
                 $i++;
             }
         }
     }
     return parent::_prepareLayout();
 }
 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'referer_pager')->setTemplate('affiliateplus/html/pager.phtml')->setCollection($this->getCollection());
     $this->setChild('referer_pager', $pager);
     $grid = $this->getLayout()->createBlock('affiliateplus/grid', 'referer_grid');
     // prepare column
     //		$grid->addColumn('id',array(
     //			'header'	=> $this->__('No.'),
     //			'align'		=> 'left',
     //			'render'	=> 'getNoNumber',
     //		));
     $grid->addColumn('referer', array('header' => $this->__('Traffic Source'), 'align' => 'left', 'render' => 'getReferer', 'searchable' => true));
     $url = Mage::getUrl('*/*/*');
     if ($this->getRequest()->getParam('click') == 'desc') {
         $header = '<a href="' . $url . 'click/asc" class="sort-arrow-desc" title="' . $this->__('ASC') . '">' . $this->__('Clicks') . '</a>';
     } else {
         $header = '<a href="' . $url . 'click/desc" class="sort-arrow-asc" title="' . $this->__('DESC') . '">' . $this->__('Clicks') . '</a>';
     }
     $grid->addColumn('total_clicks', array('header' => $header, 'index' => 'total_clicks', 'align' => 'left'));
     if ($this->getRequest()->getParam('unique') == 'desc') {
         $header = '<a href="' . $url . 'unique/asc" class="sort-arrow-desc" title="' . $this->__('ASC') . '">' . $this->__('Unique Clicks') . '</a>';
     } else {
         $header = '<a href="' . $url . 'unique/desc" class="sort-arrow-asc" title="' . $this->__('DESC') . '">' . $this->__('Unique Clicks') . '</a>';
     }
     $grid->addColumn('unique_clicks', array('header' => $header, 'index' => 'unique_clicks', 'align' => 'left'));
     if ($this->_getHelper()->getSharingConfig('balance') != 'store') {
         $grid->addColumn('store_id', array('header' => $this->__('Store View'), 'index' => 'store_id', 'type' => 'options', 'options' => $this->getStoresOption(), 'searchable' => true));
     }
     $grid->addColumn('landing_page', array('header' => $this->__('Landing Page'), 'render' => 'getUrlPath', 'searchable' => true, 'index' => 'landing_page'));
     Mage::dispatchEvent('affiliateplus_prepare_referers_columns', array('grid' => $grid));
     $this->setChild('referer_grid', $grid);
     return $this;
 }
Exemplo n.º 8
0
 protected function _prepareLayout()
 {
     $title = trim($this->getTitle());
     if (empty($title)) {
         $this->setTitle('');
     }
     $id = $this->getId();
     if (empty($id)) {
         return '';
     } else {
         $files = Mage::getResourceModel('downloads/files_collection');
         $files->addResetFilter()->addStatusFilter()->addCategoryStatusFilter()->addStoreFilter();
         $sort = '';
         if ($id == 'all') {
             $this->setIsAllCategories(true);
         } else {
             $ids = explode(',', $id);
             $files->addCategoryFilter($ids);
             $this->setIsAllCategories(false);
         }
         $items = $files->getItems();
         foreach ($items as $k => $item) {
             if (!Mage::helper('downloads')->checkCustomerGroupAccess($item) && Mage::helper('downloads')->isHideFiles()) {
                 unset($items[$k]);
             }
         }
         if (Mage::helper('downloads')->getGroupByCategory()) {
             $items = $this->groupFiles($items);
         }
         $this->setItems($items);
     }
     return parent::_prepareLayout();
 }
 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->setTemplate("affiliatepluswidget/widget.phtml");
     $this->_prepareWidgetData();
     return $this;
 }
Exemplo n.º 10
0
 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'customer_affiliate_history')->setCollection($this->getAffiliateHistory());
     $this->setChild('pager', $pager);
     return $this;
 }
Exemplo n.º 11
0
 protected function _prepareLayout()
 {
     if (Mage::registry('subdomain')) {
         parent::_prepareLayout();
         return;
     }
     $left = $this->getLayout()->getBlock('left');
     if ($left && Mage::helper('gomage_navigation')->isGomageNavigation() && Mage::getStoreConfig('gomage_navigation/category/active')) {
         $left->unsetChild('gomage.navigation.left');
         $page = Mage::getSingleton('cms/page');
         if ($page->getData('page_id')) {
             if ($page->getData('navigation_left_column')) {
                 $navigation_left = $this->getLayout()->createBlock('gomage_navigation/navigation', 'gomage.navigation.left')->setTemplate('gomage/navigation/catalog/navigation/left.phtml');
                 $navigation_left->SetNavigationPlace(GoMage_Navigation_Block_Navigation::LEFT_COLUMN);
                 $left->insert($navigation_left);
             }
         } else {
             if (!Mage::getStoreConfig('gomage_navigation/category/show_shopby')) {
                 $navigation_left = $this->getLayout()->createBlock('gomage_navigation/navigation', 'gomage.navigation.left')->setTemplate('gomage/navigation/catalog/navigation/left.phtml');
                 $navigation_left->SetNavigationPlace(GoMage_Navigation_Block_Navigation::LEFT_COLUMN);
                 $left->insert($navigation_left);
             }
         }
     }
     parent::_prepareLayout();
 }
Exemplo n.º 12
0
 protected function _prepareLayout()
 {
     if (!$this->getLayout()->getBlock('head') == null) {
         $this->getLayout()->getBlock('head')->setTitle(Mage::helper('marketplace')->__('Seller Dashboard'));
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 13
0
 /**
  * prepare block's layout
  *
  * @return Magestore_Bannerslider_Block_Bannerslider
  */
 public function _prepareLayout()
 {
     //            die('sdfsfsdsdfs');
     //
     parent::_prepareLayout();
     // $this->setTemplate('bannerslider/standardslider.phtml');
 }
Exemplo n.º 14
0
 public function _prepareLayout()
 {
     $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
     $breadcrumbs->addCrumb('home', array('label' => Mage::helper('cms')->__('Home'), 'title' => Mage::helper('cms')->__('Home Page'), 'link' => Mage::getBaseUrl()));
     $breadcrumbs->addCrumb('faq', array('label' => 'FAQ', 'title' => 'FAQ', 'link' => Mage::getUrl("faq")));
     return parent::_prepareLayout();
 }
Exemplo n.º 15
0
 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'tiers_pager')->setCollection($this->getCollection());
     $this->setChild('tiers_pager', $pager);
     $grid = $this->getLayout()->createBlock('affiliateplus/grid', 'tiers_grid');
     $url = $this->getUrl('affiliatepluslevel/index/listTier/');
     // prepare column
     $grid->addColumn('id', array('header' => $this->__('No.'), 'align' => 'left', 'render' => 'getNoNumber'));
     if ($this->getRequest()->getParam('joined') == 'desc') {
         $header = '<a href="' . $url . 'joined/asc" class="sort-arrow-desc" title="' . $this->__('ASC') . '">' . $this->__('Joined time') . '</a>';
     } else {
         $header = '<a href="' . $url . 'joined/desc" class="sort-arrow-asc" title="' . $this->__('DESC') . '">' . $this->__('Joined time') . '</a>';
     }
     $grid->addColumn('created_time', array('header' => $header, 'index' => 'created_time', 'type' => 'date', 'format' => 'medium', 'align' => 'left'));
     $grid->addColumn('name', array('header' => $this->__('Affiliates'), 'index' => 'name', 'align' => 'left', 'render' => 'getAffiliatesName'));
     if ($this->getRequest()->getParam('level') == 'desc') {
         $header = '<a href="' . $url . 'level/asc" class="sort-arrow-desc" title="' . $this->__('ASC') . '">' . $this->__('Level') . '</a>';
     } else {
         $header = '<a href="' . $url . 'level/desc" class="sort-arrow-asc" title="' . $this->__('DESC') . '">' . $this->__('Level') . '</a>';
     }
     $grid->addColumn('level', array('header' => $header, 'index' => 'level', 'align' => 'left', 'render' => 'getLevel'));
     $grid->addColumn('sum', array('header' => $this->__('Commissions'), 'align' => 'left', 'index' => 'sum', 'render' => 'getSum'));
     $grid->addColumn('status', array('header' => $this->__('Status'), 'align' => 'left', 'index' => 'status', 'type' => 'options', 'options' => array(1 => $this->__('Enabled'), 2 => $this->__('Disabled'))));
     $this->setChild('tiers_grid', $grid);
     return $this;
 }
 protected function _prepareLayout()
 {
     foreach ($this->getButtons() as $name) {
         $this->setChild('button_' . $name, $this->getLayout()->createBlock('socialshare/button_' . $name));
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 17
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         if ($title = $this->getCurrentCategory()->getMetaTitle()) {
             $headBlock->setTitle($title);
         }
         if ($description = $this->getCurrentCategory()->getMetaDescription()) {
             $headBlock->setDescription($description);
         }
         if ($keywords = $this->getCurrentCategory()->getMetaKeywords()) {
             $headBlock->setKeywords($keywords);
         }
         /*
         want to show rss feed in the url
         */
         if ($this->IsRssCatalogEnable() && $this->IsTopCategory()) {
             $title = $this->helper('rss')->__('%s RSS Feed', $this->getCurrentCategory()->getName());
             $headBlock->addItem('rss', $this->getRssLink(), 'title="' . $title . '"');
         }
     }
     if ($layout = $this->getCurrentCategory()->getPageLayout()) {
         if ($template = (string) Mage::getConfig()->getNode('global/cms/layouts/' . $layout . '/template')) {
             $this->getLayout()->getBlock('root')->setTemplate($template);
         }
     }
     return $this;
 }
 public function _prepareLayout()
 {
     if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled() && ($block = $this->getLayout()->getBlock('head'))) {
         $block->setCanLoadTinyMce(true);
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 19
0
 /**
  * Preparing layout
  *
  * @return Mage_Catalog_Block_Breadcrumbs
  */
 protected function _prepareLayout()
 {
     if ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs')) {
         $breadcrumbsBlock->addCrumb('home', array('label' => Mage::helper('catalog')->__('Home'), 'title' => Mage::helper('catalog')->__('Go to Home Page'), 'link' => Mage::getBaseUrl()));
         // MOD to add the full category breadcrumb path.
         //$current_category = Mage::registry('current_category');
         $current_category = Null;
         // Always get the all categories to get the full path
         $current_product = Mage::registry('current_product');
         if (!$current_category && $current_product) {
             $categories = $current_product->getCategoryCollection()->addAttributeToSelect('name');
             //$categories = $current_product->getCategoryCollection()->addAttributeToSelect('name')->setPageSize(1);
             foreach ($categories as $category) {
                 Mage::unregister('current_category');
                 Mage::register('current_category', $category);
             }
         }
         // end MOD
         $title = array();
         $path = Mage::helper('catalog')->getBreadcrumbPath();
         foreach ($path as $name => $breadcrumb) {
             $breadcrumbsBlock->addCrumb($name, $breadcrumb);
             $title[] = $breadcrumb['label'];
         }
         if ($headBlock = $this->getLayout()->getBlock('head')) {
             $headBlock->setTitle(join($this->getTitleSeparator(), array_reverse($title)));
         }
     }
     return parent::_prepareLayout();
 }
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'points.rewards.history.pager')->setCollection($this->getCollection());
     $this->setChild('points_pager', $pager);
     return $this;
 }
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'sales.order.invoice.history.pager')->setCollection($this->getInvoices());
     $this->setChild('pager', $pager);
     return $this;
 }
Exemplo n.º 22
0
 /**
  * Set apropriate template, attach sign2pay scripts
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->setTemplate('sign2pay/redirect.phtml');
     Mage::helper('sign2pay')->attachPaymentScripts(array('initialize' => true));
     return $this;
 }
Exemplo n.º 23
0
 protected function _prepareLayout()
 {
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         $headBlock->setTitle($this->getProduct()->getMetaTitle());
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 24
0
 /**
  * preparing the social login pop-up layout
  *
  * @return void
  */
 public function _prepareLayout()
 {
     if (Mage::getStoreConfig('sociallogin/general/enable_sociallogin') == 1 && !Mage::helper('customer')->isLoggedIn()) {
         // $this->getLayout()->getBlock('head')->addJs('sociallogin/sociallogin.js');
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 25
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         $category = $this->getCurrentCategory();
         if ($title = $category->getMetaTitle()) {
             $headBlock->setTitle($title);
         }
         if ($description = $category->getMetaDescription()) {
             $headBlock->setDescription($description);
         }
         if ($keywords = $category->getMetaKeywords()) {
             $headBlock->setKeywords($keywords);
         }
         if ($this->helper('catalog/category')->canUseCanonicalTag()) {
             $headBlock->addLinkRel('canonical', $category->getUrl());
         }
         /*
         want to show rss feed in the url
         */
         if ($this->IsRssCatalogEnable() && $this->IsTopCategory()) {
             $title = $this->helper('rss')->__('%s RSS Feed', $this->getCurrentCategory()->getName());
             $headBlock->addItem('rss', $this->getRssLink(), 'title="' . $title . '"');
         }
     }
     return $this;
 }
Exemplo n.º 26
0
 /**
  * Collection for manage products
  *
  * @return \Apptha_Marketplace_Block_Product_Manage
  */
 protected function _prepareLayout()
 {
     /**
      * Get Product Id
      */
     $productId = $this->getRequest()->getParam('id');
     /** 
      * Get Product Name
      */
     $productName = Mage::getModel('catalog/product')->load($productId)->getName();
     /** 
      * Load Layout
      */
     $this->getLayout()->getBlock('head')->setTitle($productName);
     parent::_prepareLayout();
     $manageConfigurableProductCollection = $this->manageProducts();
     /**
      * Set Collection
      */
     $this->setCollection($manageConfigurableProductCollection);
     /**
      * Get Layout
      */
     $pager = $this->getLayout()->createBlock('page/html_pager', 'my.pager')->setCollection($manageConfigurableProductCollection);
     /**
      * set Available limit
      */
     $pager->setAvailableLimit(array(10 => 10, 20 => 20, 50 => 50));
     /** 
      * Set child
      */
     $this->setChild('pager', $pager);
     return $this;
 }
 protected function _prepareLayout()
 {
     if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {
         $breadcrumbs->addCrumb('home', array('label' => Mage::helper('catalogsearch')->__('Home'), 'title' => Mage::helper('catalogsearch')->__('Go to Home Page'), 'link' => Mage::getBaseUrl()))->addCrumb('search', array('label' => Mage::helper('catalogsearch')->__('Catalog Advanced Search'), 'link' => $this->getUrl('*/*/')))->addCrumb('search_result', array('label' => Mage::helper('catalogsearch')->__('Results')));
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 28
0
 public function _prepareLayout()
 {
     $couponBlock = $this->getLayout()->getBlock('checkout.cart.coupon');
     $this->setData('coupon_html', $couponBlock->toHtml());
     $couponBlock->setTemplate('customercredit/cart/coupon.phtml');
     return parent::_prepareLayout();
 }
Exemplo n.º 29
0
 /**
  * Add payment info block to layout
  *
  * @return Mage_Payment_Block_Info_Container
  */
 protected function _prepareLayout()
 {
     if ($info = $this->getPaymentInfo()) {
         $this->setChild($this->_getInfoBlockName(), Mage::helper('payment')->getInfoBlock($info));
     }
     return parent::_prepareLayout();
 }
Exemplo n.º 30
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     /** @var Emagedev_Yanws_Model_News $entry */
     $entry = Mage::registry('yanws_entry');
     $entryTimestamp = $entry->getTimestampCreated();
     $prev = Mage::getModel('yanws/news')->getCollection()->addFieldToFilter('is_published', array('eq' => 1))->addFieldToFilter('timestamp_created', array('lt' => $entryTimestamp))->setOrder('timestamp_created', 'desc')->setPageSize(1)->setCurPage(1)->getFirstItem();
     $next = Mage::getModel('yanws/news')->getCollection()->addFieldToFilter('is_published', array('eq' => 1))->addFieldToFilter('timestamp_created', array('gt' => $entryTimestamp))->setOrder('timestamp_created', 'asc')->setPageSize(1)->setCurPage(1)->getFirstItem();
     if ($entry->isPublished()) {
         $this->setEntry($entry);
         $links = array();
         if ($prev->getId()) {
             $links['prev'] = $prev;
         } else {
             $links['prev'] = false;
         }
         if ($next->getId()) {
             $links['next'] = $next;
         } else {
             $links['next'] = false;
         }
         $this->setLinks($links);
     }
     return $this;
 }