Yii CListView-如何使用公共属性$template?

Yii CListView-如何使用公共属性$template?,yii,Yii,我用一些我不需要的div生成了这个CListView代码。 我希望不要太荒谬,在zii/widgets上硬编码类 我看到了: /** * @var string the template to be used to control the layout of various components in the list view. * These tokens are recognized: {summary}, {sorter}, {items} and {pager}.

我用一些我不需要的div生成了这个CListView代码。 我希望不要太荒谬,在zii/widgets上硬编码类

我看到了:

/**
     * @var string the template to be used to control the layout of various components in the list view.
     * 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.
     */
    public $template="{summary}\n{sorter}\n{items}\n{pager}";
似乎我可以访问$template并使用它做一些事情-有人能告诉我,我们如何删除摘要、分拣器、项目或寻呼机


请注意。

只需删除任何您不希望呈现的
{placeholder}
s即可。如需卸下分拣机:

$this->widget('zii.widgets.CListView', array( 
        // set up CListView like you want, and then:
        'template' => "{summary}\n{items}\n{pager}",
)); 

你能告诉我们你到底不需要哪个div吗?我试着让'template'=>“”(里面没有任何内容)-但是我们默认得到,{items}和{summary}:(