« Zurück zu 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 Anhänge
33458 Angesehen
Durchschnitt (0 Stimmen)
Die durchschnittliche Bewertung ist 0.0 von max. 5 Sternen.
Kommentare
Antworten im Thread Autor Datum
Marcelo, Do you plan on pushing any other the... Ryan T 13. Oktober 2009 17:21
Given the new features in LR, it's no longer... Marcelo Ruiz Camauër 19. Oktober 2009 10:20
Hi Ryan, This feature has been implemented in... Jorge Ferrer 19. Oktober 2009 07:55
Thanks for the heads up guys... I am usually... Ryan T 20. Oktober 2009 21:19

Marcelo,

Do you plan on pushing any other the templeting back into the community?
Gepostet am 13.10.09 17:21.
Hi Ryan,

This feature has been implemented in 5.3. It's called "Site Templates".
Gepostet am 19.10.09 07:55.
Given the new features in LR, it's no longer necessary.
Gepostet am 19.10.09 10:20 als Antwort auf 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... =)
Gepostet am 20.10.09 21:19 als Antwort auf Jorge Ferrer.