Yii Framework Forum: Login Porlet On The Sidebar - Yii Framework Forum

Jump to content

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

Login Porlet On The Sidebar Rate Topic: -----

#1 User is offline   Trinh Duy Hung 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 73
  • Joined: 26-October 12

Posted 06 December 2012 - 08:47 PM

Hello!

I need to create a login porlet on the sidebar. So I think I must create a widget and put it in column2.php. The porlet like this:
Attached File  wp-plugin-sidebar-login.jpg (12.37K)
Number of downloads: 16
The thing is we must collect information from a form then validate against a database table, so we must create a model and controller. I've looked at CWidget. The API document says: CWidget is the base class for widgets. A widget is a self-contained component that may generate presentation based on model data. It can be viewed as a micro-controller that embeds into the controller-managed views.
CInputWidget says: CInputWidget is the base class for widgets that collect user inputs. . So I'm confusing. Which one is for me and how to use it. By the way when we use CWidget and when we must you CInputWidget?

Thank you for reading.

Regards.
0

#2 User is offline   LastDay 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 06-March 11
  • Location:Russia

Posted 07 December 2012 - 07:48 AM

Hello,

In my opinion, it's simplier to use CWidget in this case. CInputWidget usually used for jQuery UI related widgets - see its subclasses.
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