Russian TYPO3 community

Russian TYPO3 community (http://forum.typo3.ru/index.php)
-   TypoScript практикум (http://forum.typo3.ru/forumdisplay.php?f=27)
-   -   PageBrowser в tx_commerce (http://forum.typo3.ru/showthread.php?t=6672)

AleXUnder 14.08.2008 16:57

PageBrowser в tx_commerce
 
Коллеги, подскажите пожалуйста, нет ли решения спрятать PageBrowser когда страница всего одна, а то как то совсем не красиво. В стандатных настройках не нашел, вот думаю может кто сталкивался уже

mishas 14.09.2008 18:12

Есть решение но не элегантное.

Правим файл:
/typo3conf/ext/commerce/lib/class.tx_commerce_pibase.php

Ищем строки:
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

И заменяем
PHP код:

if(($this->conf['showPageBrowser']==1) && (is_array($this->conf['pageBrowser.']['wraps.']))) 

На

PHP код:

if(($local_count >= $this->conf['maxRecords']  ) && ($local_count >= $this->conf['maxRecords']  ) && ($this->conf['showPageBrowser']==1) && (is_array($this->conf['pageBrowser.']['wraps.']))) 


Где
$local_count задаем до строк
PHP код:

// ###########    product list    ######################
        
if (is_array($this->category_products)){ 

Таким образом:
PHP код:

 $local_count=count($this->category_products); 



Часовой пояс GMT +4, время: 00:13.

Работает на vBulletin® версия 3.8.1.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot