gpt4 book ai didi

yii - 使寻呼机出现在列表顶部

转载 作者:行者123 更新时间:2023-12-02 07:04:59 24 4
gpt4 key购买 nike

在 YII 中我有:

$dataProvider = new CArrayDataProvider ($auctions , 
array(
'pagination'=>array(
'pageSize'=> 12,
),
));

$this->widget('zii.widgets.CListView', array(
'dataProvider'=> $dataProvider,
'itemView' => '_frontpageAuction',
'summaryText' => '',
'emptyText' => '
No auctions available to display.
',
));

如何更改它,使寻呼机不出现在网格的底部,而是出现在顶部?

最佳答案

使用 template property of CListView :

$this->widget('zii.widgets.CListView', array(
'dataProvider'=> $dataProvider,
'itemView' => '_frontpageAuction',
'summaryText' => '',
'emptyText' => '
No auctions available to display.
',
'template'=>'{pager}{items}'
));

还有:

These tokens are recognized: {summary}, {sorter}, {items} and {pager}. They will be replaced with the summary text, the sort links, the data item list, and the pager.

类似的属性可用于 CGridView also: template .

关于yii - 使寻呼机出现在列表顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13972709/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com