« Back to 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 Attachments
33459 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments
Threaded Replies Author Date
Marcelo, Do you plan on pushing any other the... Ryan T October 13, 2009 5:21 PM
Given the new features in LR, it's no longer... Marcelo Ruiz Camauër October 19, 2009 10:20 AM
Hi Ryan, This feature has been implemented in... Jorge Ferrer October 19, 2009 7:55 AM
Thanks for the heads up guys... I am usually... Ryan T October 20, 2009 9:19 PM

Marcelo,

Do you plan on pushing any other the templeting back into the community?
Posted on 10/13/09 5:21 PM.
Hi Ryan,

This feature has been implemented in 5.3. It's called "Site Templates".
Posted on 10/19/09 7:55 AM.
Given the new features in LR, it's no longer necessary.
Posted on 10/19/09 10:20 AM in reply to 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... =)
Posted on 10/20/09 9:19 PM in reply to Jorge Ferrer.