you can just add $index variable to your _view in CListView
<div class="view" > <i><b><?php echo CHtml::encode($data->getAttributeLabel('Project title')); ?>:</b></i> <span class="info"> <?php echo $index+1;?>//this is the variable in CListView </span> <h3><?php echo CHtml::link(CHtml::encode($data->title), array('view', 'id'=>$data->project_id)); ?></h3>In your index file in your view you can see like this :
<h1>Projects</h1> <?php $this->widget('zii.widgets.CListView', array( 'dataProvider'=>$dataProvider, 'itemView'=>'_view', )); ?>
This is really too useful and has more ideas from your blog. Keep sharing more blog like this, thank you. ................................Please contact us for Oracle Fusion SCM Training details
ReplyDeleteThis is just the kind of information that I had been looking for a long time. Thank you very much for posting this blog its very nice.
ReplyDeleteSAP S4 HANA Training in Dallas
SAP S4 HANA Training in Dallas