Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Dmitry Fengoff
Setup Personal site for users by default
21 de Maio de 2012 03:57
Resposta

Dmitry Fengoff

Ranking: New Member

Mensagens: 16

Data de entrada: 19 de Março de 2012

Mensagens recentes

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
Hitoshi Ozawa
RE: Setup Personal site for users by default
21 de Maio de 2012 05:16
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

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?
Dmitry Fengoff
RE: Setup Personal site for users by default
21 de Maio de 2012 05:24
Resposta

Dmitry Fengoff

Ranking: New Member

Mensagens: 16

Data de entrada: 19 de Março de 2012

Mensagens recentes

Hi. Thanks for reply.
I want to create new public page using template when a user is created
Jakub Trojanek
RE: Setup Personal site for users by default
24 de Setembro de 2012 05:06
Resposta

Jakub Trojanek

Ranking: New Member

Mensagens: 7

Data de entrada: 11 de Julho de 2012

Mensagens recentes

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...
Harish Kumar
RE: Setup Personal site for users by default
24 de Setembro de 2012 05:18
Resposta

Harish Kumar

Ranking: Expert

Mensagens: 444

Data de entrada: 31 de Julho de 2010

Mensagens recentes

Hi

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

 1##
 2## Default User Public Layouts
 3##
 4
 5    #
 6    # If the properties "layout.user.public.layouts.enabled" and
 7    # "layout.user.public.layouts.auto.create" are both set to true, then users
 8    # will have public layouts and they will be automatically created. The
 9    # settings below are used for the creation of the initial public pages.
10    #
11    # If you need to add more than one page, set the property
12    # "default.user.public.layouts.lar" to specifiy a LAR file instead.
13    #
14    # For even more complex behavior, override the addDefaultUserPublicLayouts
15    # method in com.liferay.portal.events.ServicePreAction.
16    #
17
18    #
19    # Set the name of the public layout.
20    #
21    default.user.public.layout.name=Welcome
22
23    #
24    # Set the layout template id of the public layout.
25    #
26    default.user.public.layout.template.id=2_columns_ii
27
28    #
29    # Set the portlet ids for the columns specified in the layout template.
30    #
31    default.user.public.layout.column-1=82,3
32    default.user.public.layout.column-2=33
33    default.user.public.layout.column-3=
34    default.user.public.layout.column-4=
35
36    #
37    # Set the friendly url of the public layout.
38    #
39    default.user.public.layout.friendly.url=/home
40
41    #


HTH
Jakub Trojanek
RE: Setup Personal site for users by default
24 de Setembro de 2012 06:57
Resposta

Jakub Trojanek

Ranking: New Member

Mensagens: 7

Data de entrada: 11 de Julho de 2012

Mensagens recentes

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)
Juan Gonzalez
RE: Setup Personal site for users by default
24 de Setembro de 2012 09:34
Resposta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 2378

Data de entrada: 28 de Outubro de 2008

Mensagens recentes

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
RE: Setup Personal site for users by default
25 de Setembro de 2012 00:14
Resposta

Jakub Trojanek

Ranking: New Member

Mensagens: 7

Data de entrada: 11 de Julho de 2012

Mensagens recentes

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...
Juan Gonzalez
RE: Setup Personal site for users by default
25 de Setembro de 2012 00:37
Resposta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 2378

Data de entrada: 28 de Outubro de 2008

Mensagens recentes

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
RE: Setup Personal site for users by default
25 de Setembro de 2012 06:44
Resposta

Jakub Trojanek

Ranking: New Member

Mensagens: 7

Data de entrada: 11 de Julho de 2012

Mensagens recentes

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!