Simplifying Community Provisioning

A common story we hear from the community and our customers is that Liferay has a lot of powerful features.  However, it is difficult for those who want to just create a community and start collaborating.  They have to first create layouts, then add portlets, and then update portlets.

 

This is one area that some of our competitors have done quite well.  They make it quite simple for someone to quickly create a collaborative community/site and start using it.  Although the new Social Office addresses many of these short comings by making it extremely simple to create collaborative sites, we want to bring this simplicity to Liferay Portal as well.

 

We have decided to tackle this in two phases.  The first phase will be an approach that we have taken for several customers and is backwards compatible for 5.1 EE.  This solution leverages the existing features like model listeners and Liferay's Live Staging capabilities to provide community templates. 

 

You may follow the following steps to create your own community template:

1.     Create a PRIVATE community with the name DEFAULT_TEMPLATE

2.     Activate staging for this community by:

a.     Click on "Manage Pages" for the DEFAULT_TEMPLATE

b.     Click on the “Settings Tab”

c.     Check the “Activate Staging”

 

3.     With the staging environment activated, add public and/or private pages and then configure the pages with portlets as necessary

a.     You can add portlets to those pages simply by clicking “View Pages”

b.     Note the red background indicates you are in the staging environment

 

 

 

Now you have created your first community template.  The next community you create will have the same layouts and portlet as the DEFAULT_TEMPLATE.  Changing the layouts in the template community will only impact new communities.  Existing communities will not receive the changes.

 

If you wish to have different templates for open, restricted, and private communities, you easily do so as well.  You would need to repeat the above to create the OPEN_TEMPLATE, PRIVATE_TEMPLATE, and RESTRICTED_TEMPLATE communities.  The rules are as follows:

1.     If community is open, templates pages from OPEN_TEMPLATE will be used

2.     If community is restricted, template pages from RESTRICTED_TEMPLATE will be used

3.     If community is private, template pages from PRIVATE_TEMPLATE will be used

4.     If the template for the associated community type is not found, the DEFAULT_TEMPLATE will be used.

5.     If there are no templates, then nothing is done.

 

In the second phase, we will instroduce a new template builder feature in 5.3 (Q3 2009).   This feature requires changes that prevents us from making it available in 5.1 and 5.2.

 

 

 

Blogs
hi Michael C. Han,

can u explain the usage of workflow. (below activate staging)
if we tick Activate workflow, in what way users can get features of it .
The workflow feature is for staging and remote staging. Basically you users must go through a workflow before actually approving the staged changes into production. This feature is not used for templating at this time.

When we put in the full implementation of templating in 5.3, we will take advantage of this so that template changes can go through workflow for approvals.
Hi Michael,
What should I do, to make it work in 5.2.2?

Regards,
Bruno
Has anyone been able to get any piece of this working in 5.2.2? I see that the "second phase" will not be available pre-5.2.3 but is there any way to port the basic one by creating DEFAULT_TEMPLATE to 5.2.2?
Could I do this same thing with Orgnaization rather than Community. In our org we're looking at mapping our deaprtments to organizations and then making virtual or oad hoc groups of people as communities.

Does this template approach using staging work with Orgs as well as communities?

Thanks,

Chris
Right now no, only for communities, but would not be difficult to make available with orgs as well.
Hi Michael! This is awesome!! Gosh, it took me long enough to find it though. What would you say the pros and cons are to using Communities vs Organizations?
Thank you in advance!
-S
1) Communities give you the ability to join and invite members; organizations do not.
2) Organizations are hierarchical in nature while communities are flat

There are other functional differences, but those are the largest ones. We are working towards merging communities and organizations in future release (e.g. 6.1), but it has been relatively low on our priority list.
Hi Michael,

I tried creating an OPEN_TEMPLATE, with a number of pages and child pages off them (So displayed as tabs across the top, and child pages appear when hovering over as drop downs). Populated them with portlets. Then when i created a new open community, the template defaulted ok, but only the first page, or tab contained all its child pages. For the rest of the (tabs) the parent pages were listed but all the child pages were not created.

Am i missing something here?

Thank you for any feedback,
Greatly appreciated
Kind Regards
Asad
I created a DEFAULT_TEMPLATE and, like Asad, I'm having some problems too with my new communities:

- Some of the pages are created with an empty name and it is not possible to add it directly
- Some child pages are created in a different parent.
- Permissions are not applied (this also happens when import/export from lar file)

I'm using liferay 5.2.3. Are all this known issues?

Regards.
Hi Michael, That's great! Thank you.
Hi Mike, thank you. Community template is very good feature. As noticed, there is a portlet called page template. What's relationship between community template and page template? What's best practice on using both of them? How can users use both of them in a given community?
Hi Mike, besides the community template and page templates, there are site templates. What's difference among these three templates? What's best practice? Thanks.
Has anyone gotten this to work on liferay 6 ? I tried following the above steps but it does not seem to work. also in the code i can find no references to the strings OPEN_TEMPLATE, RESTRICTED_TEMPLATE etc