« 返回到 Site Templates...

Community templates

Version 6+ #

Use the Site Templates Portlet. It can create templates that will be available when creating new Organizations or communities. This portlet can be found in the Control Panel.

Version 5.2 #

There is a way to have site templates for communities in version 5.2. (although it is not as flexible as the portlet in version 6 and above).

This feature allows us to have 4 different templates depending on the type of the community.You may create a separate template for private, open, and protected communities. You may also create a default template that will apply if the open, private, and restricted templates are not defined.

In order to use this feature we should create communities to be our templates. The template community names must be: DEFAULT_TEMPLATE, OPEN_TEMPLATE, PRIVATE_TEMPLATE, or RESTRICTED_TEMPLATE.The template community should be a private community to avoid unauthorized access. (The templated pages are stored in the community's staging area to avoid users accidentally coming to this community.)

A newly created community will have its layouts preconfigured based on its type. If community is public, templates pages from OPEN_TEMPLATE will be used. If community is restricted, template pages from RESTRICTED_TEMPLATE will be used. If community is private, template pages from PRIVATE_TEMPLATE will be used. If any of the above templates are not found, the DEFAULT_TEMPLATE will be used. If there are no templates, then nothing is done.

This feature is programmed with a model Listener (CommunityTemplateModelListener.java) and it can be easily modified and extended using the Extension Environment to create our own listener and then registering it in the following property:

value.object.listener.com.liferay.portal.model.LayoutSet=com.liferay.portal.model.LayoutSetListener,com.liferay.portlet.communities.model.CommunityTemplateModelListener

Related Pages #

Site Templates Portlet

0 附件
33486 查看
平均 (0 票)
满分为 5,平均得分为 0.0。
评论
讨论主题回复 作者 日期
Marcelo, Do you plan on pushing any other the... Ryan T 2009年10月13日 下午5:21
Given the new features in LR, it's no longer... Marcelo Ruiz Camauër 2009年10月19日 上午10:20
Hi Ryan, This feature has been implemented in... Jorge Ferrer 2009年10月19日 上午7:55
Thanks for the heads up guys... I am usually... Ryan T 2009年10月20日 下午9:19

Marcelo,

Do you plan on pushing any other the templeting back into the community?
在 09-10-13 下午5:21 发帖。
Hi Ryan,

This feature has been implemented in 5.3. It's called "Site Templates".
在 09-10-19 上午7:55 发帖。
Given the new features in LR, it's no longer necessary.
在 09-10-19 上午10:20 发帖以回复 Ryan Terwedo
Thanks for the heads up guys... I am usually not one to be bleeding edge and upgrade super fast but as soon as 5.3 is out I am on it... =)
在 09-10-20 下午9:19 发帖以回复 Jorge Ferrer