论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Dmitry Fengoff
Setup Personal site for users by default
2012年5月21日 上午3:57
答复

Dmitry Fengoff

等级: New Member

帖子: 14

加入日期: 2012年3月19日

最近的帖子

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
2012年5月21日 上午5:16
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 8000

加入日期: 2010年3月23日

最近的帖子

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
2012年5月21日 上午5:24
答复

Dmitry Fengoff

等级: New Member

帖子: 14

加入日期: 2012年3月19日

最近的帖子

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
2012年9月24日 上午5:06
答复

Jakub Trojanek

等级: New Member

帖子: 7

加入日期: 2012年7月11日

最近的帖子

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
2012年9月24日 上午5:18
答复

Harish Kumar

等级: Regular Member

帖子: 232

加入日期: 2010年7月31日

最近的帖子

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
2012年9月24日 上午6:57
答复

Jakub Trojanek

等级: New Member

帖子: 7

加入日期: 2012年7月11日

最近的帖子

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
2012年9月24日 上午9:34
答复

Juan Gonzalez

LIFERAY STAFF

等级: Liferay Legend

帖子: 1235

加入日期: 2008年10月28日

最近的帖子

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
2012年9月25日 上午12:14
答复

Jakub Trojanek

等级: New Member

帖子: 7

加入日期: 2012年7月11日

最近的帖子

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
2012年9月25日 上午12:37
答复

Juan Gonzalez

LIFERAY STAFF

等级: Liferay Legend

帖子: 1235

加入日期: 2008年10月28日

最近的帖子

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
2012年9月25日 上午6:44
答复

Jakub Trojanek

等级: New Member

帖子: 7

加入日期: 2012年7月11日

最近的帖子

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!