Yii Framework Forum: Skins for Zii widgets - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Skins for Zii widgets Rate Topic: -----

#1 User is offline   mech7 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 220
  • Joined: 26-March 09

Posted 19 April 2010 - 04:44 AM

How can I create customized skins for Zii widgets?

How should the poperty and path in my view directory look like?

http://www.yiiframew...get#skin-detail
0

#2 User is offline   Vince. 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 432
  • Joined: 29-December 08
  • Location:Los Angeles,CA

Posted 19 April 2010 - 04:59 AM

Did you check http://www.yiiframew.../CWidgetFactory ? It has documentation about the usage of skins with widgets.
Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image
0

#3 User is offline   mech7 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 220
  • Joined: 26-March 09

Posted 19 April 2010 - 09:09 PM

View PostVince., on 19 April 2010 - 04:59 AM, said:

Did you check http://www.yiiframew.../CWidgetFactory ? It has documentation about the usage of skins with widgets.


I read but I dont understand where the view files are located? For example the CListView.. where is the html? Where can I add or modify the html of pager add one on top etc..
0

#4 User is offline   Vince. 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 432
  • Joined: 29-December 08
  • Location:Los Angeles,CA

Posted 21 April 2010 - 01:47 AM

You need to put the skins under 'protected/views/skins' for example for the CListView widget you create a file called CListView.php under the skins directory 'protected/views/skins' then you specify in the CListView widget the property 'skin'=>'CListView'. Inside the CListView file you return an associative array of the initial property values for a widget, in this case the CListView widget.
Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image
0

#5 User is offline   mech7 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 220
  • Joined: 26-March 09

Posted 05 May 2010 - 03:15 AM

View PostVince., on 21 April 2010 - 01:47 AM, said:

You need to put the skins under 'protected/views/skins' for example for the CListView widget you create a file called CListView.php under the skins directory 'protected/views/skins' then you specify in the CListView widget the property 'skin'=>'CListView'. Inside the CListView file you return an associative array of the initial property values for a widget, in this case the CListView widget.


Hmm isnt there a view to modify the html?
0

#6 User is offline   aleksdj 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 05-April 10

Posted 05 May 2010 - 09:22 PM

According to what I read about this, Widgets Skins only provide us to change some colors, backgrounds and whatever variable it has.
The problem here is that Skin feature is not what you are thinking it is @metch7.

@Vince, @metch7 are talking about how to change the output html in list, grid, etc. widgets...
Am I wrong?

Alex
0

#7 User is offline   mech7 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 220
  • Joined: 26-March 09

Posted 05 May 2010 - 09:34 PM

View Postaleksdj, on 05 May 2010 - 09:22 PM, said:

According to what I read about this, Widgets Skins only provide us to change some colors, backgrounds and whatever variable it has.
The problem here is that Skin feature is not what you are thinking it is @metch7.

@Vince, @metch7 are talking about how to change the output html in list, grid, etc. widgets...
Am I wrong?

Alex


Yes you are correct... as this is kinda the big advantage of MVC :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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