Yii中是否存在全局設置,以便爲admin(ajax網格)/ view /和edit視圖更改"©" to "©"
的htmlentity顯示?如何全局使CGridView使用「raw」作爲CDataColumn的默認類型?
我發現在CGridView參數中,我可以像下面那樣更新每列到'type'=>'raw'
,但我需要在20個模型中進行此操作,並且每個視圖都要手動進行,除非我可以在全局某處執行此操作。我有一個腳本,用於導入©
的數據,當客戶去編輯項目時,他們希望看到©
。任何幫助都很有幫助!
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'item-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
'price1',
'price1label',
'price2',
'price2label',
array('name'=>'name','type'=>'raw'), // this will display the raw entity
很好的答案!謝謝! – Fostah
如何以及在哪裏存儲文件?在擴展名和使用文件夾名稱空間或只是一個文件? – Andre