Fórumok
How to hide a page after user log in
Luca kk, módosítva 12 év-val korábban
How to hide a page after user log in
Expert Bejegyzések: 284 Csatlakozás dátuma: 2010.12.07. Legújabb bejegyzések
Hi all,
I builded my portal with an initial login form which is a
page called "Login": in this page I have only a "login" portlet.
At beginning, the menu bar has only this page.
After user log in, even the other pages will appear because I set them
with "View" permission for user and not for guest.
The page "Login" has "View" permission for guest
and not for user but automatically it has "View" permission even
for the user (because User is stronger role than Guest).
How can I do to hide "Login" page (for user) after login?
Does it exsist another solution to this?
Thanks in advance.
I builded my portal with an initial login form which is a
page called "Login": in this page I have only a "login" portlet.
At beginning, the menu bar has only this page.
After user log in, even the other pages will appear because I set them
with "View" permission for user and not for guest.
The page "Login" has "View" permission for guest
and not for user but automatically it has "View" permission even
for the user (because User is stronger role than Guest).
How can I do to hide "Login" page (for user) after login?
Does it exsist another solution to this?
Thanks in advance.
Jignesh Vachhani, módosítva 12 év-val korábban
RE: How to hide a page after user log in
Liferay Master Bejegyzések: 803 Csatlakozás dátuma: 2008.03.10. Legújabb bejegyzések
you can write your logic in navigation.vm file in theme and check the login condition and render the navigation.vm content accordingly.
Luca kk, módosítva 12 év-val korábban
RE: How to hide a page after user log in
Expert Bejegyzések: 284 Csatlakozás dátuma: 2010.12.07. Legújabb bejegyzések
Hi Jiqnesh,
thanks for reply.
How can I check the login condition?
Luca
thanks for reply.
How can I check the login condition?
Luca
Mayur Patel, módosítva 12 év-val korábban
RE: How to hide a page after user log in
Expert Bejegyzések: 358 Csatlakozás dátuma: 2010.11.17. Legújabb bejegyzések
Hello Luca,
Your check in navigation.vm could be like this
Refer Hide page for authenticated users for more
Thanks
Your check in navigation.vm could be like this
#foreach ($nav_item in $nav_items)
#if(!$nav_item.getName().equals("PagetoHide") || !$is_signed_in)
// render the navigation
#end
#end
Refer Hide page for authenticated users for more
Thanks
Luca kk, módosítva 12 év-val korábban
RE: How to hide a page after user log in (Válasz)
Expert Bejegyzések: 284 Csatlakozás dátuma: 2010.12.07. Legújabb bejegyzések
Hi Mayur,
thanks for reply and tip,
it works!!!!!!!!!!!
Luca
thanks for reply and tip,
it works!!!!!!!!!!!
Luca
Mayur Patel, módosítva 12 év-val korábban
RE: How to hide a page after user log in
Expert Bejegyzések: 358 Csatlakozás dátuma: 2010.11.17. Legújabb bejegyzések
Good to hear this , Thanks to jignesh also for pointers !!!!
Jignesh Vachhani, módosítva 12 év-val korábban
RE: How to hide a page after user log in
Liferay Master Bejegyzések: 803 Csatlakozás dátuma: 2008.03.10. Legújabb bejegyzések
Cheers !!!!!
Gurumurthy Godlaveeti, módosítva 10 év-val korábban
RE: How to hide a page after user log in
Regular Member Bejegyzések: 208 Csatlakozás dátuma: 2011.08.12. Legújabb bejegyzésekMayur Patel:
Hello Luca,
Your check in navigation.vm could be like this#foreach ($nav_item in $nav_items) #if(!$nav_item.getName().equals("PagetoHide") || !$is_signed_in) // render the navigation #end #end
Refer Hide page for authenticated users for more
Thanks
Hello Mayur,
I got your point about how to hide a page as per logged in user , but as per my requirement , can u tell me the Liferay solution.
I have one theme & i am going to use it for multiple organizations. I have many number of guest pages & Guest pages vary from one organization to another organization so how to handle in naviagtion.vm .
Mayur Patel, módosítva 10 év-val korábban
RE: How to hide a page after user log in
Expert Bejegyzések: 358 Csatlakozás dátuma: 2010.11.17. Legújabb bejegyzések
Hi Gurumurthy,
Please create a new thread for this.
Thanks,
Please create a new thread for this.
Thanks,
Anuvab Ghosh, módosítva 8 év-val korábban
RE: How to hide a page after user log in
Regular Member Bejegyzések: 130 Csatlakozás dátuma: 2015.04.18. Legújabb bejegyzésekMayur Patel:
Hello Luca,
Your check in navigation.vm could be like this#foreach ($nav_item in $nav_items) #if(!$nav_item.getName().equals("PagetoHide") || !$is_signed_in) // render the navigation #end #end
Refer Hide page for authenticated users for more
Thanks
I have almost the same requirement. I want to hide one navigation menu ("Login") after user logged in.
How to do it?
and please tell me how to render or hide it in vm file?
Thanks in advance.
Shivaji C, módosítva 11 év-val korábban
RE: How to hide a page after user log in
Regular Member Bejegyzések: 143 Csatlakozás dátuma: 2012.10.18. Legújabb bejegyzésekJignesh Vachhani:
you can write your logic in navigation.vm file in theme and check the login condition and render the navigation.vm content accordingly.
Dear Jignesh ,can u tell me the logic crispily, what should i write , i have a login page , just after login of a user, i dont want to show that login page for user in dockbar, for this what logic i have to write, please need help, bcz i dont have any previous knowledge,Thanks
Tejas Kanani, módosítva 11 év-val korábban
RE: How to hide a page after user log in
Liferay Master Bejegyzések: 654 Csatlakozás dátuma: 2009.01.06. Legújabb bejegyzések
Shivaji,
You can make login page hidden so that it wont show in Navigation. And from Control Panel --> Portal Settings you can define the default home page so that every time login page will come up when user opens site.
Thanks,
Tejas
You can make login page hidden so that it wont show in Navigation. And from Control Panel --> Portal Settings you can define the default home page so that every time login page will come up when user opens site.
Thanks,
Tejas
Vikash Pareek, módosítva 11 év-val korábban
RE: How to hide a page after user log in
New Member Bejegyzések: 15 Csatlakozás dátuma: 2012.12.11. Legújabb bejegyzések
Hi Tejas Sir,
It is good logic but if i want to improve this by following way then what should i have to do ?
Guest only view login page and after successfully logged in (become user) view all the page of default site.
Above worked with your logic but i want after successfully logged in he redirect to home page of default site not stay on login page by viewing this message "you are logged in with 'XYZ' ".
For above requirement i have done following 2 attempts :
1.) If i use "default.landing.page.path=/web/guest/home" property then it worked fine but when session time out and user logged in again then user do not redirect to last page at which time out done. In this case user redirect to /web/guest/home due to default.landing.page property.
I have already set "auth.forward.by.last.path=true" property.
2.) If i have set "default.landing.page.path=/c/portal/login" property and did not give view permission to guest for all the page in default site then /c/portal/login page also not visible and error founds "you dont have permission to view this page".
So please tell me what i have to do ?
It is good logic but if i want to improve this by following way then what should i have to do ?
Guest only view login page and after successfully logged in (become user) view all the page of default site.
Above worked with your logic but i want after successfully logged in he redirect to home page of default site not stay on login page by viewing this message "you are logged in with 'XYZ' ".
For above requirement i have done following 2 attempts :
1.) If i use "default.landing.page.path=/web/guest/home" property then it worked fine but when session time out and user logged in again then user do not redirect to last page at which time out done. In this case user redirect to /web/guest/home due to default.landing.page property.
I have already set "auth.forward.by.last.path=true" property.
2.) If i have set "default.landing.page.path=/c/portal/login" property and did not give view permission to guest for all the page in default site then /c/portal/login page also not visible and error founds "you dont have permission to view this page".
So please tell me what i have to do ?