Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
David Ilechukwu
Customize Sign In Portlet?
October 9, 2012 1:20 PM
Answer

David Ilechukwu

Rank: Regular Member

Posts: 128

Join Date: June 7, 2010

Recent Posts

Hello People,
I am trying to customize default Liferay login view such that when you click on the "Sign In" link, it shows a large image on the left and the actual Sign In Portlet Window on the right like the Hotmail Login Screen:

I am not sure if I need to customize the Liferay Sign In Portlet to include the image, or do I write a new portlet to contain the image.
Also how do I make the Sign In Portlet display without the default "portlet border" around it?

Whats the best way to achieve these scenarios please?

Regards
Bart Simpson
RE: Customize Sign In Portlet?
October 9, 2012 11:50 PM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 524

Join Date: August 29, 2011

Recent Posts

  1. You can create a link "Sign In" to a new page
  2. Create a new page and place 2 portlets on it (a. Web Content display (add image in a web content) , b. Sign in Portlet)
  3. Remove the border using "look and feel" option of the sign-in portlet , or customize as required by CSS


Hope it helps
Sayandip Ghosh
RE: Customize Sign In Portlet?
October 10, 2012 4:57 AM
Answer

Sayandip Ghosh

Rank: New Member

Posts: 11

Join Date: June 23, 2011

Recent Posts

You can also create a web content and embed the sign-in portlet inside the web content using a structure and a template.

Check this blog

http://www.liferay.com/web/barrie.selack/blog/-/blogs/6748202

Thanks
David Ilechukwu
RE: Customize Sign In Portlet?
October 10, 2012 8:39 AM
Answer

David Ilechukwu

Rank: Regular Member

Posts: 128

Join Date: June 7, 2010

Recent Posts

Thank you very much, Bart.
I have done as you suggested. Worked perfectly. I added a new instance of the "Web Content Display" portlet to the left column (under my Welcome page) and then I clicked on Add Web Content link - I was able to upload and add a new image inside the FCK Editor that was displayed. I was also able to remove the borders using the Configuration button.

However, a couple of scenarios arise:
The web content page still shows on the left column with the image AFTER I have signed in.
Is there no way, perhaps to alter the content of the Web Content Portlet on sign to show something like a dashboard instead?

Also I noticed the Sign In portlet still shows after sign in - however it now displays "You are signed in as Test Test".
How to stop the Sign In portlet from showing after Sign In?
And also how to make the Web Content Display - show something else (in this case a dashboard) after sign in?


Thanks in advance everyone for your helpful answers.

Regards,
Peter
Apoorva Prakash
RE: Customize Sign In Portlet?
October 10, 2012 8:51 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Peter Rodriguez:

The web content page still shows on the left column with the image AFTER I have signed in.
Is there no way, perhaps to alter the content of the Web Content Portlet on sign to show something like a dashboard instead?


To avoid this, you have to do the following:
1. apply single column layout.
2. customize sign-in portlet's JSP, i.e. login.jsp in using hook and render WC dynamically in the same JSP.

Peter Rodriguez:

Also I noticed the Sign In portlet still shows after sign in - however it now displays "You are signed in as Test Test".
How to stop the Sign In portlet from showing after Sign In?
And also how to make the Web Content Display - show something else (in this case a dashboard) after sign in?

You have to redirect to some community or user private page for this purpose.

Hope this will help,

Thanks and Regards,
Apoorva Prakash
Anonymous
RE: Customize Sign In Portlet?
October 10, 2012 9:20 AM
Answer

Anonymous

In your template you can check to see if they are signed in. If they are then don't embed the sign-in portlet and such.

If you need more control then create a hook to change what you need. There are also settings you can change in the control pannel to change what type of input is used for signing in
David Ilechukwu
RE: Customize Sign In Portlet?
October 10, 2012 9:33 AM
Answer

David Ilechukwu

Rank: Regular Member

Posts: 128

Join Date: June 7, 2010

Recent Posts

Thanks Prakash.
Couple of questions, please.


To avoid this, you have to do the following:
1. apply single column layout.
2. customize sign-in portlet's JSP, i.e. login.jsp in using hook and render WC dynamically in the same JSP.


Question 1:
Please how do you mean render WC dynamically in same JSP?
You mean I should embed an instance of the Web COntent Display portlet inside the login.jsp?
Please how do I do that?


You have to redirect to some community or user private page for this purpose.


Question 2:
Please how to redirect to some community or user private page, on login?
WHere would the best place to put the redirect code?
Example of what Redirect code would look like?
Where would be the best place to redirect to? (Public Pages/Private Pages)?


Thanks for your assistance,
Peter
David Ilechukwu
RE: Customize Sign In Portlet?
October 10, 2012 9:34 AM
Answer

David Ilechukwu

Rank: Regular Member

Posts: 128

Join Date: June 7, 2010

Recent Posts

Thanks Bradley,
Where should the hook be placed please?
Inside login.jsp?
Regards,
Peter
Apoorva Prakash
RE: Customize Sign In Portlet?
October 11, 2012 12:43 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Peter Rodriguez:

Question 1:
Please how do you mean render WC dynamically in same JSP?
You mean I should embed an instance of the Web COntent Display portlet inside the login.jsp?
Please how do I do that?

see this link.

Peter Rodriguez:

Question 2:
Please how to redirect to some community or user private page, on login?
WHere would the best place to put the redirect code?
Example of what Redirect code would look like?
Where would be the best place to redirect to? (Public Pages/Private Pages)?


These code is generally written in LoginAction class (if you are customizing them)

Hope this will help...

Thanks and Regards,
Apoorva Prakash