Next, I want to move the login fields(account name, password, and remember me) to the page header. Honestly, I have no idea where to start, since there is no manual or tutorials on this topic. As a beginner, I can only do thing which has tutorials:) What is the best way to accomplish this? Is it using CPortlet or CWidget? How?
Is there any similar demo? I tried to read the Chive open source project(https://launchpad.net/chive), but was depressed by its complexity, how a human can do that:)~
I’m a newbie to YII. The last week i build some lowlevel app pages which are working well.
Now i’m trying to add login fields to the header of the application.
I’m using the demo application of YII 1.1.1. and tried to copy the login widget code (see below) from the demo-login page to the main-page that includes the header ( /protected/views/layouts/main.php ), but this gives an error.
Have your widget (or portlet) check first if the current user guest. If so, display a login form, view of which may reside inside your portlet.
It would help you a lot by reading further on the sample portlets of the blog tutorial. Those are excellent examples which should be able to provide you with base code for your login portlet.