Fórum

customize the arrangement of components in liferay login portlet

thumbnail
John Voltaire Maximo, modificado 8 Anos atrás.

customize the arrangement of components in liferay login portlet

Regular Member Postagens: 106 Data de Entrada: 19/06/15 Postagens Recentes
Hey guys,

I'm making a login form right now, but according to the requirements, the login page should look different. see the attached image.
how can I customize the login page to look like this?
thumbnail
Alexey Kakunin, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Liferay Master Postagens: 621 Data de Entrada: 07/07/08 Postagens Recentes
thumbnail
John Voltaire Maximo, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Regular Member Postagens: 106 Data de Entrada: 19/06/15 Postagens Recentes
Hey sir thanks, may I ask why I need to modify navigation.jsp?
after all I just need to rearrange some elements in the log in page..
thumbnail
Andew Jardine, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
The reference to navigation.jsp is not for the "page navigation" but for the items that are below the button to sign in. These include the SSO stuff like (facebook, open id, etc) that might be enabled and the create account link.
thumbnail
John Voltaire Maximo, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Regular Member Postagens: 106 Data de Entrada: 19/06/15 Postagens Recentes
oh I just figured that out myself,,
how can I adjust the forgot password link just like the sample screenshot? Is it in the JSP? if it's not is it in the css?
where do I find the styling for this?
thumbnail
Andew Jardine, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
You can find it under /html/portlet/login/naavigtion/forgot_password.jsp. The CSS you can see of course, as always, using the Chrome inspector or Firebug. If you have a custom theme that you have built then you can override the classes in your custom.css file -- or you can hook the JSP and change it however you like (including adding your own custom CSS classes)
thumbnail
John Voltaire Maximo, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Regular Member Postagens: 106 Data de Entrada: 19/06/15 Postagens Recentes
yeah my plan now was to create a different link to forgot password on the fieldset above...
then remove some of the icons under... I'll remove the openId and the forgotpassword from the icon-list below...

I'll try it now... my problem is that the calling of the links is in a loop,, this was the code right.. how do I call only the needed links if it's like this?
<liferay-util:buffer var="navigation">
<liferay-ui:icon-list>
<%
for (String section : PropsValues.LOGIN_FORM_NAVIGATION_PRE) {
%>
<liferay-util:include page='<%= "/html/portlet/login/navigation/" + _getSectionJsp(section) + ".jsp" %>' portletId="<%= portletDisplay.getRootPortletId() %>" />
<%
}
for (String section : PropsValues.LOGIN_FORM_NAVIGATION_POST) {
%>
<liferay-util:include page='<%= "/html/portlet/login/navigation/" + _getSectionJsp(section) + ".jsp" %>' portletId="<%= portletDisplay.getRootPortletId() %>" />
<%
}
%>
</liferay-ui:icon-list>
</liferay-util:buffer>

and on the link on my page,, how do I call only the forgot password jsp.. hope you guys can help
thumbnail
Andew Jardine, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
I think what you are looking to do can be done with the portal-ext.properties configuration. These properties can be set/unset to control some of that stuff. By default the properties referenced in that code are --


    #
    # Input a list of sections that will be included in login form navigation.
    #
    login.form.navigation.pre=anonymous,sign-in,facebook,open-id
    login.form.navigation.post=create-account,forgot-password


If you want to eliminate all the "navigation items" for example, you can probably just do this --


    #
    # Input a list of sections that will be included in login form navigation.
    #
    login.form.navigation.pre=
    login.form.navigation.post=create-account,forgot-password
thumbnail
John Voltaire Maximo, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Regular Member Postagens: 106 Data de Entrada: 19/06/15 Postagens Recentes
Oh I get it,
then how about using an anchor tag to call the forgot password.jsp?
can I do this?

login.jsp
...code here.
...code here....
<a href = '<%= "/html/portlet/login/navigation/forgot_password.jsp" %>'> Forgot Password? </a>


After doing it I got a content encoding error haha,, how do I reach the forgot password page using this?
thumbnail
Andew Jardine, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Not quite. Don't forget that you are using portlets so you need to use a portlet URL (in this case). The forgot_password.jsp has the following --


<c:if test="<%= showForgotPasswordIcon %>">
	<portlet:renderurl var="forgotPasswordURL">
		<portlet:param name="struts_action" value="/login/forgot_password" />
	</portlet:renderurl>

	<liferay-ui:icon image="help" message="forgot-password" url="<%= forgotPasswordURL %>" />
</c:if>


.. and from this snippet you will find that this block --


	<portlet:renderurl var="forgotPasswordURL">
		<portlet:param name="struts_action" value="/login/forgot_password" />
	</portlet:renderurl>


.. generates the URL that the user goes to in order to see the forgot password stuff.
thumbnail
John Voltaire Maximo, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Regular Member Postagens: 106 Data de Entrada: 19/06/15 Postagens Recentes
when I added the code sir, the sign-in portlet disappeared haha..

I have another problem sir,,, can I somehow put the portal-ext code you mentioned somewhere in the hook project instead?
Because after I do this I have to give the output to my boss,,
but then his portal-ext properties would be different from mine.... is there any way to make it easier?
thumbnail
Anil T, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Expert Postagens: 313 Data de Entrada: 14/01/12 Postagens Recentes
Hi John,

You can give set of properties to be updated in portal-ext.proerpties file to your boss. Otherwise you have to include it in ext enviroment and deploy it. but it is not the better option.

Thanks,
Anil T
thumbnail
John Voltaire Maximo, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Regular Member Postagens: 106 Data de Entrada: 19/06/15 Postagens Recentes
what's the difference between navigation.pre and navigation.post? just asking, because they almost look the same
thumbnail
John Voltaire Maximo, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Regular Member Postagens: 106 Data de Entrada: 19/06/15 Postagens Recentes
I added the code just like this..
Andrew Jardine:


<c:if test="<%= showForgotPasswordIcon %>">
	<portlet:renderurl var="forgotPasswordURL">
		<portlet:param name="struts_action" value="/login/forgot_password" />
	</portlet:renderurl>

	<liferay-ui:icon image="help" message="forgot-password" url="<%= forgotPasswordURL %>" />
</c:if>


but after deploying it sir, the sign-in portlet disappeared altogether.. can you tell me what I did wrong?
thumbnail
Andew Jardine, modificado 8 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
I'll need a few more details. Which jsp did you put that in? did you alter any other jsps?

Perhaps provide your entire solution here including all the pages that you are overriding. It's hard to say waht might be wrong from just one code snippet.
thumbnail
Kiran Yalavali, modificado 7 Anos atrás.

RE: customize the arrangement of components in liferay login portlet

Regular Member Postagens: 175 Data de Entrada: 15/10/14 Postagens Recentes
Hi John,

I'm also facing the same problem so if you resolved this issue,
please tell me how to separate "create_account and forget_password " url links in liferay login hook .

which jsp your saperate two url links like("create_account and forget_password ").

Please help me.


Thanks,
Kiran.