yii - "space" Character When Call Widget Or "echo $Content" -
when render clistview widget, between items printed spaces (" ")(showed in follow image), why? , how can remove them? thanks.
index view codes: <div class="borderproject"> <?php $this->widget('zii.widgets.clistview', array( 'dataprovider'=>$dataprovider, 'itemview'=>'_view', 'template'=>'{items}{pager}', )); ?> </div> _view file contents: <div class="projectnum"> <div class="proimages"><img src="<?php echo yii::app()->theme->baseurl;?>/images/projects/project1.jpg" class="proimgsize"/></div> <div class="prodetail"> <div class="protitle"><a href="<?php echo yii::app()->baseurl;?>/projects/view?id=<?php echo chtml::encode($data->id);?>" ><?php echo chtml::encode($data->title); ?></a></div> <div class="prodtext"><?php echo chtml::encode($data->content); ?></div> </div> <div class="moredetail"><a style="text-decoration:none;" href="<?php echo yii::app()->baseurl;?>/projects/view?id=<?php echo chtml::encode($data->id);?>" >read more</a></div> </div> <div class="spproject"></div> actionindex public function actionindex() { $dataprovider=new cactivedataprovider('projects'); $this->layout = 'clientside'; $this->render('index',array( 'dataprovider'=>$dataprovider, )); }
try convert file _view in utf-8 without bom encoding
yii
No comments:
Post a Comment