php - How to add an HTML element after two record zii.widgets.CListView widget Yii -
<?php $this->widget('zii.widgets.clistview', array( 'dataprovider'=>$dataprovider, 'summarytext'=>'', 'itemview'=>'_view', )); ?>
i need output
__________________________ id : 10 id : 11 name : xxx name : yyyy age : 15 age : 20 place: abc place:xyz -------------------------- id : 12 id : 13 name : aaa name : sss age : 24 age : 27 place: vvc place:xzss --------------------------
how change _view.php
this?
this voucher printing, need reduce paper cost, that's why seek solution.
you can use html posted mohit bhansali. you'll have add more css first:
.view { float: left; width: 250px; /* or other width */ }
then in _view.php
clear float on top, each second item. can use predefined $index
variable:
<?php if($index!=0 && $index%2==0): ?> <div style="clear:left"></div> <?php endif; ?>
Comments
Post a Comment