slyder
(K Gorbachov)
1
Hello,
I am using CListView widget:
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider' => $hotEstatesProvider,
'itemView' => 'index-hot-estate-list-item',
'htmlOptions' => array('class' => 'hotAdvertSmall')
)); ?>
and i want to set different classes per each odd item. How can i determine them inside index-hot-estate-list-item.php file?
Inside file ‘$this’ refers to controller so i could not get any info about current item and widget.
Thanks.
tri
(tri - Tommy Riboe)
2
($index % 2) ? odd : even
Read more here.
(not tested)
/Tommy
slyder
(K Gorbachov)
3
Thanks! Have not seen this variables before.