Yii Framework Forum: How to customize the look of CListView - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

How to customize the look of CListView Rate Topic: -----

#1 User is offline   Duc Tran 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 14-July 11

Posted 08 August 2011 - 01:27 AM

I want the list of number-button to be of specific layout as my theme (in the attachment). Don't know how to do it?

Attached File(s)


0

#2 User is offline   rei 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 328
  • Joined: 10-November 10

Posted 25 August 2011 - 10:00 AM

Beside setup your CListView:

$this->widget('zii.widgets.CListView', array(
   'dataProvider'=>$dataProvider,
   'summaryText'=>'Page {page} of {pages}',
   'template'=>'{items} {summary} {pager}',
   'pager'=>array(
      'class'=>'CLinkPager',
      'header'=>'',
   ),	
   'itemView'=>'_view',	
));


I believe you will need to customize your css files.
Fipick - Find and pick recommendations
0

#3 User is offline   Duc Tran 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 14-July 11

Posted 30 August 2011 - 10:58 AM

View Postrei, on 25 August 2011 - 10:00 AM, said:

Beside setup your CListView:

$this->widget('zii.widgets.CListView', array(
   'dataProvider'=>$dataProvider,
   'summaryText'=>'Page {page} of {pages}',
   'template'=>'{items} {summary} {pager}',
   'pager'=>array(
      'class'=>'CLinkPager',
      'header'=>'',
   ),	
   'itemView'=>'_view',	
));


I believe you will need to customize your css files.


Where could I find these css files?
0

#4 User is offline   golchi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 30-August 11
  • Location:Lomé

Posted 30 August 2011 - 11:29 AM

View PostDuc Tran, on 30 August 2011 - 10:58 AM, said:

Where could I find these css files?


Hey I am very new to Yii but I bet you will get this easily with 'Firebug' the extension of Firefox.
But you can also check the 'css' folder in your path_to_yourapp\css.

I hope this has been helpful :-).
0

#5 User is offline   trenchard 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 07-December 10
  • Location:California

Posted 30 August 2011 - 03:21 PM

I recommend just overwriting the styles in your core site CSS with the appropriate selectors instead of hacking the jquery or Yii theme styles. The included css files are usually found here...


/css - installed with yiic webapp
/yii_source_dir/zii/widgets/assets/listview/styles.css

The browser will use the files cached in the /assets directory so don't edit those directly.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users