« Back

Simplifying Community Provisioning

Company Blogs May 7, 2009 By Michael C. Han Staff

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.

 

 

 

Threaded Replies Author Date
hi Michael C. Han, can u explain the usage... Auditya manikanta Vadrevu May 8, 2009 2:07 AM
The workflow feature is for staging and remote... Michael C. Han May 8, 2009 5:31 AM
Hi Michael, What should I do, to make it work... Bruce Galo May 9, 2009 9:13 AM
You'll need to upgrade to the next 5.2 release. Michael C. Han May 19, 2009 2:14 PM
Thank you Michael! Bruce Galo May 22, 2009 11:44 AM
Has anyone been able to get any piece of this... Jessica Thrasher July 14, 2009 10:32 AM
Could I do this same thing with Orgnaization... Chris Wirth May 18, 2009 9:58 AM
Right now no, only for communities, but would... Michael C. Han May 19, 2009 2:14 PM
Hi Michael! This is awesome!! Gosh, it took me... Susan Lacis May 18, 2009 5:02 PM
1) Communities give you the ability to join and... Michael C. Han May 19, 2009 2:16 PM
Hi Michael, I tried creating an... Asad Siddique June 29, 2009 8:32 AM
I created a DEFAULT_TEMPLATE and, like Asad,... Antonio Nuño October 23, 2009 4:00 PM
Hi Michael, That's great! Thank you. Jonas Yuan July 30, 2009 7:01 AM
Hi Mike, thank you. Community template is very... Jonas Yuan July 30, 2009 7:36 AM
Hi Mike, besides the community template and... Jonas Yuan July 30, 2009 8:51 AM
Has anyone gotten this to work on liferay 6 ? I... Jelmer Kuperus October 13, 2010 1:11 AM
This was removed for 6 in favor of the site... Michael C. Han October 14, 2010 1:45 AM

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 .
Posted on 5/8/09 2:07 AM.
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.
Posted on 5/8/09 5:31 AM in reply to Auditya manikanta Vadrevu.
Hi Michael,
What should I do, to make it work in 5.2.2?

Regards,
Bruno
Posted on 5/9/09 9:13 AM in reply to Michael C. Han.
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
Posted on 5/18/09 9:58 AM.
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
Posted on 5/18/09 5:02 PM.
You'll need to upgrade to the next 5.2 release.
Posted on 5/19/09 2:14 PM in reply to Bruno Hernan Gallo.
Right now no, only for communities, but would not be difficult to make available with orgs as well.
Posted on 5/19/09 2:14 PM in reply to Chris Wirth.
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.
Posted on 5/19/09 2:16 PM in reply to Susan Lacis.
Thank you Michael!
Posted on 5/22/09 11:44 AM in reply to Michael C. Han.
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
Posted on 6/29/09 8:32 AM in reply to Michael C. Han.
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?
Posted on 7/14/09 10:32 AM in reply to Bruno Hernan Gallo.
Hi Michael, That's great! Thank you.
Posted on 7/30/09 7:01 AM.
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?
Posted on 7/30/09 7:36 AM in reply to Jonas Yuan.
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.
Posted on 7/30/09 8:51 AM.
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.
Posted on 10/23/09 4:00 PM in reply to Asad Siddique.
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
Posted on 10/13/10 1:11 AM.
This was removed for 6 in favor of the site templates capability
Posted on 10/14/10 1:45 AM in reply to jelmer kuperus.