Foren

Setup Personal site for users by default

thumbnail
Dmitry Fengoff, geändert vor 11 Jahren.

Setup Personal site for users by default

New Member Beiträge: 16 Beitrittsdatum: 19.03.12 Neueste Beiträge
Hi all

I want to set up for all new users some template by default automaticaly. I mean user profile -> Personal site -> Public Pages -> (Community site for example).
I came up hook and model listener for user creating where i'll set template but I think it's not good way.



I use liferay 6.1
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Do you want to apply the template automatically when you choose to create a public/private page?

Or
Do you want to create a new public/private page using template when a user is created?
thumbnail
Dmitry Fengoff, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

New Member Beiträge: 16 Beitrittsdatum: 19.03.12 Neueste Beiträge
Hi. Thanks for reply.
I want to create new public page using template when a user is created
Jakub Trojanek, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

New Member Beiträge: 7 Beitrittsdatum: 12.07.12 Neueste Beiträge
Hi, I'd need the same.
Strange, that it seems quite obvious functionality, but it doesn't look like Liferay supports the concept of default private site template, despite having the ability to set private site template for a particular user...
thumbnail
Harish Kumar, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

Expert Beiträge: 483 Beitrittsdatum: 31.07.10 Neueste Beiträge
Hi

Looks like you can achieve the required functionality by using below properties specified portal-ext.properties file -

##
## Default User Public Layouts
##

    #
    # If the properties "layout.user.public.layouts.enabled" and
    # "layout.user.public.layouts.auto.create" are both set to true, then users
    # will have public layouts and they will be automatically created. The
    # settings below are used for the creation of the initial public pages.
    #
    # If you need to add more than one page, set the property
    # "default.user.public.layouts.lar" to specifiy a LAR file instead.
    #
    # For even more complex behavior, override the addDefaultUserPublicLayouts
    # method in com.liferay.portal.events.ServicePreAction.
    #

    #
    # Set the name of the public layout.
    #
    default.user.public.layout.name=Welcome

    #
    # Set the layout template id of the public layout.
    #
    default.user.public.layout.template.id=2_columns_ii

    #
    # Set the portlet ids for the columns specified in the layout template.
    #
    default.user.public.layout.column-1=82,3
    default.user.public.layout.column-2=33
    default.user.public.layout.column-3=
    default.user.public.layout.column-4=

    #
    # Set the friendly url of the public layout.
    #
    default.user.public.layout.friendly.url=/home

    #


HTH
Jakub Trojanek, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

New Member Beiträge: 7 Beitrittsdatum: 12.07.12 Neueste Beiträge
Thanks, this partialy solves the case, but this method is:
- static and predfined - I want my admin to be able to set and modify the default tempate from GUI
- limited - I want to setup portlets with specific preferences set for my template, and disallow users to configure (e.g. want to predefine two IFrame instances pointing to diferent locations in my intranet)
thumbnail
Juan Gonzalez P, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
In that case, you can set users page adding a site template to a user group and then adding those users to the user group. Best way to achieve that AFAIK.
Jakub Trojanek, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

New Member Beiträge: 7 Beitrittsdatum: 12.07.12 Neueste Beiträge
Thanks, I also considered that approach, but then the site gets created just once, for UserGroup, not for each User, and normal users cannot modify or configure it.
That's fine for some portlets I want to limit permissions to, but at the same time I'd like to allow users to modify layout and placement for their "site instance".

Anyway, maybe that's already far enough from obvious, and rightfully qualifies for a hook...
thumbnail
Juan Gonzalez P, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
With user group templates you can define the "area" where users can modify the layout etc. It's a new feature in 6.1
Jakub Trojanek, geändert vor 11 Jahren.

RE: Setup Personal site for users by default

New Member Beiträge: 7 Beitrittsdatum: 12.07.12 Neueste Beiträge
The "Page customizations" setting for the layout columns? I forgot about that - maybe that's the way to do it. I'll see if it solves the problem.
Thank you!
thumbnail
gnp present, geändert vor 6 Jahren.

RE: Setup Personal site for users by default

Junior Member Beiträge: 54 Beitrittsdatum: 09.06.10 Neueste Beiträge
Hi..In liferay 7 ga 4 i created sites with site templates for both public and private pages to have default pages for all users, and put lar file in portal.ext-properties like in documentation. I setup ON for propagation. All is ok and new users created have pages which i configured in lar file, but propagation works just in sites in portal and not works for lar files. Can you give me some help please?
Jill Garland, geändert vor 6 Jahren.

RE: Setup Personal site for users by default

New Member Beitrag: 1 Beitrittsdatum: 08.11.16 Neueste Beiträge
Can you point me to the documentation for doing this. It is exactly what we need.