2013-02-28 61 views
0

我想设置链接的数量来浏览使用kickstarter创建的我的 扩展中的结果页面。 (Page1 Page2 Page3 ...)。使用pi_list_browseresults()打印typo3中的页面

的最大数量可以很容易地设置(在这种情况下,以4):

**$this->internal["maxPages"]=t3lib_div::intInRange($lConf["maxPages"],0,1000,4); ** 

但是,这会告诉我的第一四个环节的时候,无论在 我的页面。所以说我有7个结果页,我已经在页面 四:我看到“Page1 Page2 Page3 Page 4”。

是否有可能动态更改 。

所以第4页上我看到“第二页第三页第4页第5页”

第5页之我见“第3页第4页第5页第6页” 等等?

+0

其TYPO3版本您使用的? – 2013-02-28 08:41:02

+0

我使用的Typo3版本4.5.20 – philomine 2013-02-28 08:44:25

回答

0

查看该链接:http://www.typo3forum.net/forum/extension-modifizieren-neu-erstellen/55721-fe-userlisting.html。 用户已经使用,他已经成功地实现分页,等给出代码:

............

$this->internal['results_at_a_time'] = t3lib_utility_Math::forceIntegerInRange($lConf['results_at_a_time'], 0, 1000, 3); // Number of results to show in a listing. 
$this->internal['maxPages'] = t3lib_utility_Math::forceIntegerInRange($lConf['maxPages'], 0, 1000, 2); // The maximum number of "pages" in the browse-box: "Page 1", 'Page 2', etc. 

.......... 。

1

我知道你在寻找的是:

$this->internal['pagefloat'] 

它的定义是这样的:

Using $this->internal['pagefloat']: this defines were the current page is shown in the 
list of pages in the Pagebrowser. If this var is an integer it will be interpreted as 
position in the list of pages. If its value is the keyword "center" the current page will 
be shown in the middle of the pagelist. 

你可以找到更多选项和说明功能pi_list_browseresults(类tslib_pibase)的文档标题:425 线,http://doxygen.frozenkiwi.com/typo3/html/de/d1c/class_8tslib__pibase_8php_source.html