Go to the documentation of this file.00001 <?php
00002
00007 class News extends oxUBase
00008 {
00013 protected $_oNewsList = null;
00018 protected $_sThisTemplate = 'page/info/news.tpl';
00019
00024 protected $_blTop5Action = true;
00025
00030 protected $_blBargainAction = true;
00031
00032
00037 protected $_oPageNavigation = null;
00038
00043 protected $_iCntPages = null;
00044
00050 public function getNews()
00051 {
00052 if ( $this->_oNewsList === null ) {
00053 $this->_oNewsList = false;
00054
00055 $iPerPage = (int) $this->getConfig()->getConfigParam( 'iNrofCatArticles' );
00056 $iPerPage = $iPerPage ? $iPerPage : 10;
00057
00058 $oActNews = oxNew( 'oxnewslist' );
00059
00060 if ( $iCnt = $oActNews->getCount() ) {
00061
00062 $this->_iCntPages = round( $iCnt / $iPerPage + 0.49 );
00063
00064 $oActNews->loadNews( $this->getActPage() * $iPerPage, $iPerPage );
00065 $this->_oNewsList = $oActNews;
00066 }
00067 }
00068
00069 return $this->_oNewsList;
00070 }
00071
00072
00078 public function getBreadCrumb()
00079 {
00080 $aPaths = array();
00081 $aPath = array();
00082
00083 $aPath['title'] = oxRegistry::getLang()->translateString( 'PAGE_INFO_NEWS_TITLE', oxRegistry::getLang()->getBaseLanguage(), false );
00084 $aPath['link'] = $this->getLink();
00085
00086 $aPaths[] = $aPath;
00087
00088 return $aPaths;
00089 }
00090
00096 public function getPageNavigation()
00097 {
00098 if ( $this->_oPageNavigation === null ) {
00099 $this->_oPageNavigation = false;
00100 $this->_oPageNavigation = $this->generatePageNavigation();
00101 }
00102
00103 return $this->_oPageNavigation;
00104 }
00105
00106 }