2011-12-09 9 views
1

私はこの生成されたCListViewコードに、私が必要としないdivをいくつか持っています。 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}"; 

私が$テンプレートにアクセスし、それを何かを行うことができますようだ - 誰がどのように我々はソーターはアイテムやページャ概要を削除することができ、私に教えてくださいできますか?

アドバイスをしてください。

+0

正確に必要なdivを教えていただけますか? – Chux

答えて

0

レンダリングしたくない{placeholder}のいずれかを削除してください。例:ソーター:

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

私は 'template' => ''(何もない)を作ろうとしましたが、デフォルトでは{items}と{summary}が得られます。 :( – MEM

関連する問題