掲示板

How to modify landing page after login?

thumbnail
10年前 に Niki Lin によって更新されました。

How to modify landing page after login?

Junior Member 投稿: 31 参加年月日: 13/05/09 最新の投稿
Dears,
My liferay portal runs for couple of months and it works very well.
I've set landing page to index page after user login.
But, someday it changed.
After user login, the landing page has been as attachment.

I've disable user public and private page at my portal-ext.properties.


#Disable User private page
 layout.user.private.layouts.enabled=false
 layout.user.private.layouts.modifiable=false
 layout.user.private.layouts.auto.create=false
 
 #Disable User public page
 layout.user.public.layouts.enabled=false
 layout.user.public.layouts.modifiable=false
 layout.user.public.layouts.auto.create=false


I've searched for solutions at forums and I don't find any posts as I meet.
Would somebody tell me how to fix it?

Thanks and best regards,
Niki Lin@Taiwan

添付ファイル:

10年前 に sravan kumar によって更新されました。

RE: How to modify landing page after login?

Junior Member 投稿: 78 参加年月日: 13/02/19 最新の投稿
go to control panel->Portal settings there Default Landing Page filed is present, you can give the url for landing page
thumbnail
10年前 に Niki Lin によって更新されました。

RE: How to modify landing page after login?

Junior Member 投稿: 31 参加年月日: 13/05/09 最新の投稿
I've modified it but it still doesn't work...
Does anybody have the other solution?

Thanks a lot and best regards,
Niki@TW
thumbnail
10年前 に srikanth velugoti によって更新されました。

RE: How to modify landing page after login?

Junior Member 投稿: 79 参加年月日: 09/04/24 最新の投稿
Hi Niki ,


# Set the default landing page path for logged in users relative to the
# server path. This is the page users are automatically redirected to after
# logging in. For example, if you want the default landing page to be
# http://localhost:8080/web/guest/login, set this to /web/guest/login. To
# activate this feature, set auth.forward.by.last.path to true. To customize
# the behavior, see com.liferay.portal.events.DefaultLandingPageAction in
# the "login.events.post" property above.
#
default.landing.page.path=
#default.landing.page.path=/web/guest/login

HTH ,

srikanth velugoti
thumbnail
10年前 に Tejas Kanani によって更新されました。

RE: How to modify landing page after login?

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
I've modified it but it still doesn't work...

What page url you've used here. Make sure it's relative i.e. /web/guest/home and page has view proper view access. And are you getting any error in backlogs ? If you want a common landing page for every user than you can define a property default.landing.page.path= OR you can set it from Control Panel.

But If you want complex logic like based on the site membership it should take user to particular site you need to write custom landing page hook.
I've already created a Custom Landing Page Hook available from Liferay Marketplace. Check this out if it might be helpful.

Thanks,
Tejas Kanani
http://www.opensourceforlife.com
thumbnail
10年前 に Niki Lin によって更新されました。

RE: How to modify landing page after login?

Junior Member 投稿: 31 参加年月日: 13/05/09 最新の投稿
Thanks for your replies.
But, I tried these two solutions and it's still the same.
There is no any error in backlog.
I am so confused why it happened.

The portal-ext.properties is as follows,

..........
#Disable User private page
layout.user.private.layouts.enabled=false
layout.user.private.layouts.modifiable=false
layout.user.private.layouts.auto.create=false

#Disable User public page
layout.user.public.layouts.enabled=false
layout.user.public.layouts.modifiable=false
layout.user.public.layouts.auto.create=false
...
# Set the default landing page path for logged in users relative to the
# server path. This is the page users are automatically redirected to after
# logging in. For example, if you want the default landing page to be
# http://localhost:8080/web/guest/login, set this to /web/guest/login. To
# activate this feature, set auth.forward.by.last.path to true. To customize
# the behavior, see com.liferay.portal.events.DefaultLandingPageAction in
# the "login.events.post" property above.
#default.landing.page.path=/index
default.landing.page.path=
..............
##
## Set override.default.landing.page.path to true if you want this property be override
## by CustomLandingPage path. If this is not provided by default it will take its value
## as true. And if this is set to false, CustomLandingPage hook will redirect to this page
## only. It needs to be true in case of Custom Landing page to work.
##
override.default.landing.page.path=true
..............
##
## Set this property as per your needs for landing page after user log in. It could be from one of
## the value from below options
## 1. userPrivatePage
## 2. userPublicPage
## 3. sitePublicPage
## 4. sitePrivatePage
## 5. organizationPublicPage
## 6. organizationPrivatePage
##
custom.landing.page.type=sitePublicPage


Thanks and best regards,
Niki@TW
thumbnail
10年前 に Tejas Kanani によって更新されました。

RE: How to modify landing page after login?

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
First, below properties need to be modify in Custom Landing Page Hook's portal.properties. For that just open downloaded Custom Landing Page Hook.lpkg file using winzip/winrar and you'll see CustomLandingPage-hook-*.war. Again open that war using winzip/winrar and go to WEB-INF/classes and open portal.properties and modify the property in that file. Once done with the update in war just deployed the updated war to deploy folder.
##
## Set override.default.landing.page.path to true if you want this property be override
## by CustomLandingPage path. If this is not provided by default it will take its value
## as true. And if this is set to false, CustomLandingPage hook will redirect to this page
## only. It needs to be true in case of Custom Landing page to work.
##
override.default.landing.page.path=true
..............
##
## Set this property as per your needs for landing page after user log in. It could be from one of
## the value from below options
## 1. userPrivatePage
## 2. userPublicPage
## 3. sitePublicPage
## 4. sitePrivatePage
## 5. organizationPublicPage
## 6. organizationPrivatePage
##
custom.landing.page.type=sitePublicPage


And currently which page it's taking user to ? And when you are using
custom.landing.page.type=sitePublicPage

Make sure user is member of that site else it will not land you on proper site's page.

Thanks,
Tejas
thumbnail
10年前 に Niki Lin によって更新されました。

RE: How to modify landing page after login?

Junior Member 投稿: 31 参加年月日: 13/05/09 最新の投稿
Dear Tejas,
Thank you so much that I've solved this problem.
Actually, I've download your hook before, but I really didn't know how to use it.
After download, I added the configuration to portal-ext.properties in Liferay and restarted liferay.
But it seems the same.

So, I decided not to use this hook.
But, few weeks ago, I found there is an update of this hook and I updated it.
Maybe this update is the root cause of my problem.
Because the configuration is in the properties of the hook, not in Liferay.

Anyway, I am appreciate that you solved my problem.
Thanks for your great help.

Best regards,
Niki@TW

Tejas Kanani:
First, below properties need to be modify in Custom Landing Page Hook's portal.properties. For that just open downloaded Custom Landing Page Hook.lpkg file using winzip/winrar and you'll see CustomLandingPage-hook-*.war. Again open that war using winzip/winrar and go to WEB-INF/classes and open portal.properties and modify the property in that file. Once done with the update in war just deployed the updated war to deploy folder.
##
## Set override.default.landing.page.path to true if you want this property be override
## by CustomLandingPage path. If this is not provided by default it will take its value
## as true. And if this is set to false, CustomLandingPage hook will redirect to this page
## only. It needs to be true in case of Custom Landing page to work.
##
override.default.landing.page.path=true
..............
##
## Set this property as per your needs for landing page after user log in. It could be from one of
## the value from below options
## 1. userPrivatePage
## 2. userPublicPage
## 3. sitePublicPage
## 4. sitePrivatePage
## 5. organizationPublicPage
## 6. organizationPrivatePage
##
custom.landing.page.type=sitePublicPage


And currently which page it's taking user to ? And when you are using
custom.landing.page.type=sitePublicPage

Make sure user is member of that site else it will not land you on proper site's page.

Thanks,
Tejas
thumbnail
10年前 に Tejas Kanani によって更新されました。

RE: How to modify landing page after login?

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
Glad to here that your problem is resolved. emoticon
And feel free to reach out to me @ admin{at}opensourceforlife.com if you face any issue/query Or need any support/help in Custom Landing Page Hook. I would be glad to help you out.

Thanks,
Tejas Kanani
http://www.opensourceforlife.com