Objective of this article: Hide Sign In Portlet.
Use : No specific use. Its one of the requirement.
Do you want to Hide Sign In portlet? What does it actually means? Hiding portlet is a common requirement in Portal application. One of the most widely used portlet in Liferay is Sign In Portlet. Its used to log in the portal. After log in this portlet simply displays the name of the user who is logged in. In some requirement the client may ask you to hide the portlet after login. Here is a quick tip to hide Sign In portlet. Before log in it will be visible as usual but after log in it will be invisible.
In the below screen the Sign In portlet is shown in red color which is displayed before log in.
Log in as Admin and go to look and feel as below.
In the advance styling add below code and save the changes. Below are the two CSS classes which affect the look & feel of Sign In Portlet. This is the only one step to hide the portlet.
.signed-in .portlet-login { display: none; }
Refresh your browser. Sign In Portlet will be invisible.
Careful:
The same thing can be done in VM file of the theme also. But by changing the CSS is the most light wight solution to hide the portlet.