Просмотр полной версии : PageBrowser в tx_commerce
AleXUnder
14.08.2008, 16:57
Коллеги, подскажите пожалуйста, нет ли решения спрятать PageBrowser когда страница всего одна, а то как то совсем не красиво. В стандатных настройках не нашел, вот думаю может кто сталкивался уже
Есть решение но не элегантное.
Правим файл:
/typo3conf/ext/commerce/lib/class.tx_commerce_pibase.php
Ищем строки:
if(($this->conf['showPageBrowser']==1) && (is_array($this->conf['pageBrowser.']['wraps.']))){
$this->internal['pagefloat']=$this->piVars['pointer'];
$this->internal['dontLinkActivePage'] = $this->conf['pageBrowser.']['dontLinkActivePage'];
$this->internal['showFirstLast'] = $this->conf['pageBrowser.']['showFirstLast'];
$this->internal['showRange'] = $this->conf['pageBrowser.']['showRange'];
$this->internal['showPBrowserText']=0;
И заменяем
if(($this->conf['showPageBrowser']==1) && (is_array($this->conf['pageBrowser.']['wraps.'])))
На
if(($local_count >= $this->conf['maxRecords'] ) && ($local_count >= $this->conf['maxRecords'] ) && ($this->conf['showPageBrowser']==1) && (is_array($this->conf['pageBrowser.']['wraps.'])))
Где
$local_count задаем до строк
// ########### product list ######################
if (is_array($this->category_products)){
Таким образом:
$local_count=count($this->category_products);
Работает на vBulletin® версия 3.8.1. Copyright ©2000-2025, Jelsoft Enterprises Ltd. Перевод: zCarot