I need to know how to affect the "Displaying 1-4 of 20 result(s)." shown just below the title in this portlet. I want to change the text, etc.
I also need to know how to limit the number of pages shown in the pager at the bottom. If there are more than 3 pages, I get a clumsy wrap.
I have attached a screen snap of the portlet.
Here is the code:
<?php $this->beginContent('//layouts/main'); ?>
<div class="container">
<div class="span-4">
<div id="sidebar1">
<?php
$this->beginWidget('zii.widgets.CPortlet', array(
'title'=>'Favorites',
));
$user_id=Yii::app()->user->id;
$user_condition='user_id='.$user_id;
$criteria=new CDbCriteria;
$criteria->condition = "user_id=:user_id";
$criteria->params = array(':user_id' => $user_id);
$criteria->order = 'insert_datetime DESC';
$dataProvider=new CActiveDataProvider('UserFavorite', array(
'criteria'=>$criteria,
'pagination'=>array(
'pageSize'=>4,
),
));
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'//userFavorite/_userview', // partial view
'pager'=>array(
'class'=>'CLinkPager',
'header'=>false,
'firstPageLabel'=>'<<',
'prevPageLabel'=>'<',
'nextPageLabel'=>'>',
'lastPageLabel'=>'>>',
),
));
$this->endWidget();
?>
</div><!-- sidebar1 -->
</div>
<div id="content" class="span-14">
<?php echo $content; ?>
</div><!-- content -->
<div class="span-4">
<div id="sidebar2">
<?php
$this->beginWidget('zii.widgets.CPortlet', array(
'title'=>'Operations',
));
$this->widget('zii.widgets.CMenu', array(
'items'=>$this->menu,
'htmlOptions'=>array('class'=>'operations'),
));
$this->endWidget();
?>
</div><!-- sidebar2 -->
</div>
</div>
<?php $this->endContent(); ?>
Thanks,
Alex