Building your First Liferay Site

Exclusive offer: get 50% off this eBook here
Liferay Beginner’s Guide

Liferay Beginner’s Guide — Save 50%

Quick and easy techniques to build, deploy, and maintain your own Liferay portal with this book and ebook

$26.99    $13.50
by Gaurav Barot | December 2011 | Web Development

In this article by Gaurav Barot, author of Liferay Beginner’s Guide , you will start building your Liferay site. You will go through the following concepts in this article:

  • Components of the site
  • Community and organization—The most basic need of any Liferay Portal
  • Knowing the user group
  • Knowing page templates

(For more resources on Liferay, see here.)

Designing the site—Painting the full picture

Whenever we get the requirements of the portal, we should first ask ourselves, how would the portal look when it goes live? This one small question will open a door to a lot of other questions and a lot of information which will be required to implement the portal.

You should always think of the end state of the portal and then start painting the complete picture of the portal. This approach is known as Beginning with the end!

Now, as we have just discussed the approach we should take while starting the site design, let's understand what all information we can retrieve or get when we ask this question to ourselves. We will discuss about four main components of the Liferay Portal design.

Users

No matter what the size of the portal is—small, medium, or large—it will always be designed for the users. Users are in the centre of any portal application.

Let's think of a very common portal . Just imagine that you have to implement this portal. You are sitting in your nice comfy rocking chair and thinking of the users of this portal. What all questions would you ask yourself (or the client, if he/she is with you) about the users of this portal?

  1. Who will be using this portal?
  2. Will all the users of this portal have same privileges? Or some of the users will have more privileges than the others?
  3. Can we collect the users into any specific group?
  4. Are these users organized in any kind of hierarchy?
  5. Can the users leave or join this portal at a will? and so on.

Let's discuss about the answers of the preceding questions and the information we can retrieve from the answers.

  • If we want to provide an answer to the first question in only one word, then it can be—Users. It is quite obvious that the portal will be used by the users. However, if we go into the detail of this question we can get an answer like—all the employees of CNN, users from all over the world, John Walter who will be responsible for administration of the entire portal, and so on. So answer to this question will give us the information about all the players associated with the portal.
  • If all the users of the portal have the same privileges, then it's pretty obvious that every user will be able to perform the same function in the portal. However, this may not be the case with our portal, http://www.cnn.com. Here, we have end users who will come to the portal and will access the information; we can also have a group of internal users who can create the content. Similarly, there can be a group who can approve the content and other group can publish the content; there can also be users who are responsible for user management and one or more users who are responsible for portal management.
  • So this kind of question will give us the information about different roles and permissions associated with each role in our portal. It will also give us the information that which user should be associated with what kind of role. This information is very useful when we are working on the security piece of the portal.
  • If the answer of the third question is Yes then we can either create a user group in our portal or group the users into a specific role. This question will give us the information about user grouping in the portal.
  • Now, answer to the last two questions will be discussed in more detail in this article. However, these questions will help us to determine if we should use an organization or community or mix of both in our portal. Every Liferay portal must have at least one organization or community.

Once we get the information about the users in our portal, we should think of the content next.

Content

No portal can exist without any kind of content. The content can be a static HTML, a static article, a video, an audio, podcast, document, image, and so on. To make the portal more effective, we have to manage the content properly.

We will continue with our example of :

  • What kind of questions can we ask to ourselves or to the client about the content?
  • What are the types of the content we will use in the portal?
  • Where are we going to store the content? To Liferay database or some other external database?
  • Do we have to create the content from scratch?
  • Do we need to migrate existing content to Liferay?

And a few more…

I am sure you must be visiting many portals every day. Can you think of the possible answers to the preceding questions? Also, think of the information which can be retrieved from those answers.

  • The answer to the first question can be—document, images, web content, video, podcast, and so on. This answer will give us an idea about the content types which need to be implemented in the portal. Some of the contents like web content and documents can be available out of the box in Liferay; while other content types like video and podcast may not be available out of the box. This information will enable us to determine the types of content and effort required to create the new content.
  • The second question is a bit tricky. By default, Liferay stores the content into database. However, if the client wants we can store the content in some shared location as well. For example, storing documents into file system. Also, it requires high availability. You can refer to wiki about this on . An answer to this question will give us information like if we need to add any additional hardware or not, if we should do any specific configuration to meet the requirements, and so on.
  • Answers to third and fourth questions will be mainly used for the effort estimation purpose. If a portal like site is using a huge amount of content and all of the content has to be built from scratch then it may take a good amount of time. If the content is already available, we need to consider the effort of migrating and organizing the content.
  • We can also think of other questions like requirement of workflow, type of the flow, if staging is required for the content or not, and so on.

All of the preceding questions will give us a good picture about the content to be created or used in our portal. Once we are thorough with this section, it becomes easy to appoint someone to do content management design for your portal.

Applications

We have discussed about the user and the content of the portal. However, what about the applications which will be hosted on the portal? We cannot imagine a portal without any application nowadays. A portal can contain different applications like forum, wiki, blog, document viewer, video player, and so on. Let's get a list of questions which you should ask yourself while designing the portal:

  • What are the different applications required for this portal?
  • Do we have any application available out of the box in Liferay?
  • Do we need to modify/extend any existing application available in Liferay?
  • Do we have to create any new application for the portal? If yes, what is the complexity of this application?

Liferay ships with more than 60 applications pre-bundled known as portlets. These applications are very commonly used in many of the portals.

When we ask the preceding questions to ourselves, we get the following information:

  • Number of applications required in the portal
  • How many applications are available out of the box? If we have more applications available OOTB (out of the box) then it can reduce the development time
  • Scope of the project. Do we need any integration with external system or not?
  • Kind of applications we have to develop from scratch

Once we go through the preceding set of questions, it becomes very easy to get a picture of the applications required in our portal. It will also provide us information about the efforts required to implement the portal. So, if you are managing a portal development project, you should definitely have this information ready before starting the project.

Security

Security is one of the most important aspects of any portal. When we think about security of any portal, we must consider access to the content and the applications on the portal.

You must have come across many of the portals so far. Some of the portals allow you to create your account freely; some of the portals require an authorization before creating the account while some other portals don't allow creating an account at all. Also, there are some portals which display the same information to all the users while other portals display certain information to members only.

To put this in a nutshell, each of the portal has its own security policy and it operates based on that policy only. Once we have discussed/thought about users, content, and application in portal design, we should consider the security aspect of the portal.

Now, let's think of some of the questions which we should normally ask to ourselves/client while considering security aspect of the portal.

  • Can everyone freely create an account with the portal?
  • Do we need to migrate the users from an existing user base like LDAP?
  • Can everyone access the same information or we need to display certain information to portal members only?
  • Can all the members of the portal access all the applications with the same privileges or certain users have more privileges over other members?

And so on…

When we get answers to the preceding questions, we get following information about the portal security:

  • If everyone can create an account with the portal, then in that case we need to provide the create account functionality to the users. Also, we don't need to do any authorization on account creation. If the answer to the first question is NO, then we need to either provide some kind of authorization on account creation or we need to remove the account creation facility completely
  • If we have to migrate the users from an existing user base, then we have to think about the migration and integration. Liferay provides integration with LDAP. If the user base is not present, then we will end up creating all the accounts manually or provide users an ability to create their accounts
  • If all the users (including non-logged in users) can access the same information then we will keep all the information on public pages but if we want certain information to be accessed by members only, then we might consider putting that information on the pages which can be accessed only after logging in
  • If all the members of the portal can access the same information with same privileges then we will not need any special role in the portal. However, if a certain group or a set of users have more privileges over the other—like only content creators can create content—then we will have to create a role and provide the required permission to the role

When we think of the security of the portal, we are thinking about users and their access, applications and access to those applications, and other security-related aspects of the portal. It is very important to think about the security before implementing the portal to prevent unauthorized and unauthenticated access to the portal and applications within the portal.

Liferay Beginner’s Guide Quick and easy techniques to build, deploy, and maintain your own Liferay portal with this book and ebook
Published: December 2011
eBook Price: $26.99
Book Price: $44.99
See more
Select your format and quantity:

(For more resources on Liferay, see here.)

Have a go hero – finding out information for an intranet portal

We have discussed about the portal components and their importance in portal design. We have also discussed about the approach we should take in portal implementation. Now, it is your turn to implement the knowledge you have gathered so far.

Let's assume that you are implementing an intranet portal for a business school. The portal will be used by the students, lecturers, and external users. The portal will be used to provide information about the school to external users and keep internal users (students and lecturers) updated with day-to-day activities.

Now, implement the Beginning with the End approach discussed so far. Come up with the set of questions and possible answers and put the design of the portal on paper.

Discuss and review the design with someone whom you know is working in the portal world.

Knowing the portal requirement

You are now aware of the portal components and the way to get information related to each component. Now, we will discuss the requirements of the portal (CIGNEX Neighborhood) which we are going to implement in this article.

CIGNEX Neighborhood Portal

We need to implement a portal for CIGNEX Neighborhood—. The portal will be used by the CIGNEX Neighborhood members. We want to replicate the existing structure of CIGNEX Neighborhood to this portal. All the members are organized as shown in the following diagram:

In the preceding structure, the Neighborhood Congress is the top-level entity and Security Council, Chamber of Commerce, and Arbitration Committee are the sub-level entities. The permissions flow from top to bottom. We want our users to be structured in this format. We need to provide different applications in each group for the members to be productive and collaborative.

Along with the applications mentioned in each group, the group members are also interested in other activities like General Sports and Games, Cricket, Gardening, Collaboration, and Shopping. We want these group members to have some place in our portal where they can connect to one another based on their common interest. There is no restriction for any member to join these activities , for example two members from the Neighborhood Congress, one member from Security Council and three members from the Chamber of Commerce can be interested in the Gardening activity. All of these members should be able to collaborate at one place in any activity which is related to gardening. This is very similar to the communities in social networking websites where members from different groups can join based on their common interest.

See the following diagram to understand this scenario:

The preceding diagram mentions that users are associated with their respective group based on their function, but the area of interest cuts across the structural grouping. For example, a user who is a member of the Neighborhood Congress and another user who is a member of the Security Council will not have anything in common as long as their structured grouping is concerned, but both of them can be interested in Gardening activities.

It is also possible that one user can be a member of more than one structured groups like Security Council and Chamber of Commerce.

Each of the structured group like Chamber of Commerce and activities space in the portal will contain applications which will be used by the members of respective group or space on their pages. Please see the following table to find out the pages and applications associated with each of the group and activity space.

Name

Page

Application

Neighborhood Congress

wiki

wiki

 

Your Opinion

Forum

Security Council

Security

Panorama

Chamber of Commerce

Neighborhood Prosperity

Blogs

Arbitration Committee

Arbitration Result Page

Result Display

Sports and Game

Online Game

Game Application

Cricket Players

Latest Matches

Match Information Display

Gardening DIY

Schedule

Application to display when you can plant which vegetable

Neighborhood Exchange

Gossip

Chat

 

Video

Video Player

 

Breaking News

News

 

Photo Sharing

Photo Display

Around the Corner

Shopping

Shopping Cart

 

All of the pages mentioned in t he preceding table should be accessible only to members. A non-logged in user cannot access any of the application or the page mentioned previously.

On top of the previously mentioned structured groups and communities, the portal should allow an external user to create his/her own account. Once the account is created, a user can be assigned to the structured group by the portal admin. Once a user becomes a member of the portal, he/she can join any of the activity based on the interest.

Now, we have the requirements of the portal. We will start building our portal based on these requirements. First of all, we have to understand how the structure will be implemented for CIGNEX Neighborhood Portal. In order to do so, first we have to understand the concept of organization and community in Liferay.

Organizing users in organization and community

As per our requirements, the portal users are organized in a structured grouping. They are also interested in other activities and want to collaborate with one another using the portal. Let's see how Liferay can help us to meet these requirements.

Organization—structured grouping of users

An organization in Liferay represents an organization in real life. The organization can be a very small organization like a sports club in our neighborhood or it can be as large as a fortune 500 company. Liferay Organization can be used to replicate any organization in the real world.

The organization is a hierarchical collection of the users. It is also possible to create a sub-organization under any organization. You can create sub-organizations up to n level.

The organization can be used to represent a fully functional portal. It means, you can create pages within an organization and load them up with required applications. You can also assign users to the organization and provide them access to certain pages or applications within an organization.

Once the user is created or added to the portal, you can assign the user to as many organizations as you want. You can also create a user group in the portal and assign the entire user group to the organization. On doing so, all the users of the user group will become members of the organization. We will perform all these exercises in this article.

Liferay provides a facility to add the organization in the Portal. Let's explore more on it.

Adding the organization

If you look at the user structure of the CIGNEX Neighborhood Portal in the earlier section, you would notice that it is hierarchical. We have users associated with Neighborhood Congress, which is at the top level in the hierarchy and other users are associated with Security Council, Chamber of Commerce, and Arbitration Committee which are one level below the Neighborhood Congress.

We have to create this hierarchical structure in Liferay. Let's see how we can use Liferay to replicate the hierarchical structure.

Time for action – creating organization for CIGNEX Neighborhood

  1. Start your server. Once your server is started type in .
  2. Log in to CIGNEX Neighborhood Portal with Liferay default admin credentials: Username: test@liferay.com and Password: test.
  3. Select Control Panel from the Manage option in the Dockbar. On the left-hand panel, you will see four sections: Personal, Content, Portal, and Server.
  4. Click on the Organizations link under Portal section as displayed in the following screenshot:

    (Move the mouse over the image to enlarge.)

  5. On clicking the link, it will open an interface which displays a list of all the organizations created in the portal. Currently, we have not created any organization, so the list will be empty. It is displayed in the following screenshot:

    (Move the mouse over the image to enlarge.)

  6. Sometimes when you start Liferay with default hypersonic database, it may give you an empty list of organization. However, if you search for the organization, they may be displayed. This happens due to indexing issue. To resolve the issue click on the Server Administration link under the Server section in the Control Panel. You will see a list of options under Actions in the right panel. Click on the Execute button opposite to Reindex All Search Indexes option. This will reindex all search indexes of the portal. Wait for some time; you will be able to see all the organizations in the list.

  7. Currently, you see an empty list under Organizations because we are connected to MySQL database and have not created any organization so far. To add a new organization, click on the Add option. This will open an interface to add a new organization to the portal. It is displayed in the following screenshot:

  8. In the preceding interface, the Name field indicates name of the organization. Currently, we want to create top-level organization—Neighborhood Congress. Provide this name in the Name field.
  9. The next option is the Type. This is a drop-down field. It contains two values—Regular Organization and Location. If you select the Organization type as a Location then that organization becomes the leaf node and you cannot create any sub-organization below it. Here, we want to keep our organization as a Regular Organization so select this value from the drop down.
  10. Next option in this interface is Parent Organization. If you want to select any other organization as a parent organization of our organization, you can click on the Select link and it will open a list of organizations. You can choose from the list and provide that organization as a parent organization of the one we are creating. As we know the Neighborhood Congress is the top-level organization, so we will not select any organization as the parent.
  11. Once you have provided all these values, click on Save button from the right panel under Organization Information.

Once you save it, the organization will be added in our portal. You will also notice that the Organization Information panel has expanded and now you will see many links under it. It is displayed in the following screenshot:

You can add an image for the organization you have created. You can also select each of the links and provide information for the organization. The links and description of the links are given in the following table:

Section

Link

Use

Organization Information

Details

Contains details of the organization

Organization Information

Pages

Provides information of Public and Private pages of the organization.

Organization Information

Categorization

This link is used to add categories and tags to the organization

Identification

Address

It is used to provide address details of the organization

Identification

Phone Numbers

Used to provide phone numbers of the organization

Identification

Alternate Email Address

It is used to add e-mail addresses of the organization. You can add multiple e-mail addresses and make one of them primary

Identification

Website

It is used to provide a URL of the organization.

Identification

Services

You can add services details and operating hours for each service. These services can be Administrative, Contracts, Donation, Retail, or Training. They can be related to the organization and you can add operating hours for each of the services related to the organization.

Miscellaneous

Comments

Any comments can be added to the organization

Miscellaneous

Reminder Queries

It is used to specify custom reminder queries for the users of the organization.

Miscellaneous

Custom Fields

It will display the custom fields added to the organization

 

Now, we have added the organization; let's get familiar with all the actions associated with an organization.

Time for action – understanding actions associated with the organization

Once you have created the top-level organization and saved it, you will see it is added in your portal. Click on the View All option next to the Add option in the organization interface. It will display a list of all the organizations in the portal. Let's understand the different actions associated with the organization.

  1. Click on the Actions button displayed with Neighborhood Congress Organization.
  2. It will open a list of actions which you can perform with the Neighborhood Congress Organization.
  3. The options and their uses are as follows:
    • Edit—It will take you to the edit screen of the Organization which we have discussed in previous section.
    • Manage Pages—It will take the user to the Manage page interface of the organization. You can add and/or manage pages for the organization.
    • Manage Teams—You can add and/or manage teams for an organization.
    • Assign User Roles—You can assign organization roles to the users within an organization.
    • Assign Members—You can add existing users and/or user groups to the organization.
    • Add Users—You can add a new user to the organization. This will take you to the Add User screen with this organization already assigned in user's organization list.
    • View Users—You can view a list of the users who are members of the organization.
    • Add Regular Organization—You can add a new sub-organization under the organization.
    • Add Location—You can add a location under the organization.
    • View Suborganizations—You can view all the sub-organizations of the organizations.
    • Delete—You can delete an organization.
    • You cannot delete an organization if the organization has any members—users or user groups—associated with it or any sub-organizations created under it. To delete an organization you must remove all the associations first.

Liferay Beginner’s Guide Quick and easy techniques to build, deploy, and maintain your own Liferay portal with this book and ebook
Published: December 2011
eBook Price: $26.99
Book Price: $44.99
See more
Select your format and quantity:

(For more resources on Liferay, see here.)

What just happened?

You have created a top-level organization—Neighborhood Congress. You got familiar with all the options available in the Edit organization option.

We have also discussed all the actions associated with an organization. You are now aware of two ways of adding a sub-organization to the organization:

  • You can select Parent Organization while creating an organization
  • You can click on the Action button associated with the organization and select the Add Regular Organization option

Currently, we have not added any pages to our organizations

Have a go hero – adding Sub-Organization to Neighborhood Congress

Now, you are aware of how to add an organization. We have also discussed how to add a sub-organization under an organization. Do you feel confident about the topics we have discussed so far? Do you feel that you can now create sub-organizations independently? Well, let's check it out.

As per our requirement, we need three more sub-organizations under Neighborhood Congress—Security Council, Chamber of Commerce, and Arbitration Committee. Login as a default admin (test@liferay.com / test) and create three sub-organizations under Neighborhood Congress Organization:

  • To create Security Council sub-organization, select the top organization while creating the organization. We have discussed this option while creating the Neighborhood Congress Organization.
  • To create Chamber of Commerce sub-organization, use the Actions button next to Neighborhood Congress organization and add sub-organization using the Add Regular Organization option.
  • Add the third Organization, Arbitration Committee, with any of the preceding methods which you are more comfortable with.

In the preceding section, we have mentioned that a Location is a leaf node and we cannot create a sub-organization under a Location. However, this is a default behavior and there is one property in portal.properties responsible for it—organizations.rootable[location]=false. You can set this property in the portal-ext.properties file to true to add sub-organizations under a location. organizations.rootable[location]=true

Understanding the difference between Location and Regular Organization

So far, we have discussed about how to create the organization. We created a top-level organization and then created sub-organizations as well. While creating the organization, we had an option to choose from Regular Organization or a Location. A simple question which may arise is that what is the difference between a regular organization and a location? When do we create a regular organization and when do we use a location?

Well, we know that if you declare an organization as a Location, then you will not be able to create sub-organization under it, by default. However, that can also be changed by changing the property in portal-ext.properties. So, again we are back to the same question—when should we use an organization and when should we use a location?

As we know, the organization in Liferay represents an organization in real life. Similarly, the location in Liferay represents a location in real life. We can have an organization structure which contains a location as well and we want to implement the same structure in Liferay. For example, we can have a top-level organization as a MyBigCompany which may have sub-organizations like Finance, Sales, and IT. Now, being a multi-national organization, we may have Sales department in New York and in London as well. So here, we will implement Sales as a regular sub-organization and New York and London as locations in Liferay. Normally, Sales in New York does not need to be sub-divided so locations are created as a leaf node.

So to put this in a nutshell, we will define the organization as a Location, if we want to represent a real-life location in our structure.

Community—Collection of users having common interest

Community in Liferay is a collection of users having common interest. There are some similarities between an organization and a community. For example:

  • Community is also a collection of user
  • Community can also have a set of pages
  • Community can also be represented as a fully-functional website

However, there is one fundamental difference between the organization and the community. The communities in Liferay are not hierarchical. They are designed in Liferay in such a way that anyone from any organization can join them based on the interest. So, we can use a community in the portal in a case where the interest is cutting across the Organizational structure. Also, a user does not have to be a member of any organization to join the community. The user can be created in the portal and assigned to the community.

Let's go back to our requirements to understand the statement mentioned in the previous paragraph. We have created four organizations because we had a requirement to organize the users in a structured and hierarchical manner. Now, the requirements also mention that the members of the CIGNEX Neighborhood Portal are also interested in other activities like gardening, sports and game, cricket, collaboration, and shopping. These users may be associated with any of the four organizations we have created earlier but are also interested in one of these activities regardless of their association in the organization hierarchy. Go back and visit the image which displays user's association with the organizations and activities in CIGNEX Neighborhood portal to make this clearer.

In this scenario, the interest of the activity—gardening, sports, cricket, and so on—is cutting across the organization. So, we can create one community for each of the activity and users can join these communities. Now, in future if the user loses interest in the activity, he/she can leave the community at his/her will. User's association with the community is not so tight as the same with the organization. Also, one user can be interested in more than one activity and hence can become a member of more than one community.

When you log in to Liferay for the first time, the default page you see is a part of Liferay Portal's default community—liferay.com.. There may be a scenario where you don't even need an organization in your portal; in that case you can only create a community and publish it as a website.

We have discussed enough about the community. Now, let's see how we can add the community in Liferay Portal.

Adding the Community

As discussed, as per the structure of the CIGNEX Neighborhood Portal, we will require four organizations and five communities. We have created four organizations. Now, we will create five communities—Gardening DIY, Sports and Game, Cricket Players, Neighborhood Exchange, and Around the Corner—in this section. Let's use Liferay's out-of-the-box features to create these communities in the CIGNEX Neighborhood Portal.

Time for action – areating a community for CIGNEX Neighborhood

  1. Start your server. Once your server is started type in site.
  2. Login to CIGNEX Neighborhood Portal with Liferay default admin credentials: Username: test@liferay.com and Password: test.
  3. Select Control Panel from the Manage option in the Dockbar. Click on the Communities link under the Portal section as displayed in the following screenshot:

    (Move the mouse over the image to enlarge.)

  4. On clicking the link, it will open an interface which displays a list of all the communities created in the portal. Currently, we have only one community—CIGNEX Neighborhood (liferay.com) in our portal. Click on the Add option to add a new community. You will see the following interface, when you click on the Add button:

    (Move the mouse over the image to enlarge.)

  5. In the preceding interface, the Name field indicates the name of the community we are creating. Give the name as Gardening DIY community. Description field allows you to add the description of the community. Just type in—this is a Gardening Do It Yourself Community.
  6. Next, you will see a drop-down having Open as a default value. This drop-down is used to define the Type of the community. The community can be Open, Restricted, or Private. Here, we want everyone to join the Gardening DIY community freely. So keep the community type as Open.
  7. You can use the next checkbox to define, if your community is active or inactive. Keep the Active box checked at this moment.
  8. Next option in the interface is Categories. Currently, we do not have any category created. So keep it blank.
  9. The last option you will see is Tags. It is very similar to category. You can attach tags to your community as well. To do so, you can either select from the existing tags or type in a new tag name or click on the Add button. We don't want to provide any tag to this community, so leave this field blank and click on Save.
  10. Once you click on Save, you will see a success message and the community will be added to the portal. You will now be able to see two communities—CIGNEX Neighborhood and Gardening DIY community.

What just happened?

You became familiar with the community concept in Liferay. You are now aware of the difference between an organization and a community. You are now aware of following about the community:

  • We have discussed two ways to add the community to the portal—from the Control Panel and using the My Communities portlet.
  • You have added a new community—Gardening DIY—from the Control Panel. We have also discussed different actions associated with the community.

Time for action – understanding actions associated with the community

Once you have created the community and saved it, you will see it is added in your portal. Click on the View All option next to the Add option in the Communities interface. It will display a list of all the communities in the portal. Let's understand different actions associated with the community.

  1. Click on the Actions button displayed next to the Gardening DIY community.
  2. It will open a list of actions which you can perform with the Gardening DIY community. It is displayed in the following screenshot:

    (Move the mouse over the image to enlarge.)

    • Edit—It will take you to the edit screen of the community and you will be allowed to edit the community.
    • Manage Pages—It will take the user to the Manage page interface of the community. You can add and/or manage pages for the community.
    • Manage Teams—You can add and/or manage teams for the community.
    • Assign User Roles—You can assign Community Roles to the users within the community.
    • Assign Members—You can add existing users, user groups, or organizations to the community.
    • Leave—You can leave the community, if you are already a member of the community.
    • Delete—You can delete the community from the portal.

You can also create a community using Liferay's My Communities Portlet. You can select My Private Pages from the Go To section in the Dockbar. Once you go to your private pages, you will find My Communities Portlet. It has three tabs—Communities | Own, Communities | Have Joined, and Available Communities. Under Communities | Own tab, you will see a button Add Community. You can click on this button to add a new community. It will show you the same interface to add a community which you just used to add the Gardening DIY community.

What suits your portal—Organization or community?

We are now aware of the organization and community concepts in Liferay. We discussed the similarities between organizations and communities when we started discussing the topic of community.

Now, the question is: how to determine what suits your need? In other words, when should you use the community and when to use the organization in your portal?

Using organizations

You should consider the following points when you want to use the organization in your portal:

Using communities

You should consider the following points when you want to use the community in your portal:

We have used organization and community both in the implementation of our CIGNEX Neighborhood Portal.

Now, take a break from reading and think of the scenarios when you would consider using only organizations or only communities in a portal implementation.

User groups—Arbitrary collection of users

We have discussed two ways of collecting users—organizations and communities. Both of them have their own set of pages and the users who are member of the organization or community can access those pages.

Now, think about a situation where you have a portal for intranet and we have a few members who like to blog in that portal. So we have a small group of bloggers inside a community. How to handle this situation? We know that to organize users, we create an organization or a community. However, when it comes to organizing a group which does not fit in organization or community definition, we can use the user group functionality of Liferay.

User groups are arbitrary collection of users and are created by the portal admin. We create user groups when the users don't have any obvious organization- or community-based attribute which can bring them together. Once the user group is created, we can assign users to the user group. User groups can be assigned to a role, organization, or a community as well. On doing so, all the members of the user group will get permissions associated with the role or become member of the organization or the community respectively.

Summary

We have understood site designing concepts in this article. You should now be aware of the following topics:

  • Basics of the portal design. Components involved in portal design.
  • CIGNEX Neighborhood Portal requirements.
  • The Beginning with the End approach of portal design.
  • Organization and community concept of Liferay. We also discussed when to use the organization and the community in portal design.
  • User groups in Liferay Portal. We have discussed the importance of page templates and the way to associate page templates with the user groups.

Further resources on this subject:


About the Author :


Gaurav Barot

He has been working on Liferay for nearly three years. He has executed Liferay projects in various domains like media, healthcare, insurance etc. He has been involved in the complete lifecycle of the project starting from requirement gathering to deployment. He has worked on various versions of Liferay from 5.x to 6.0 SP1. He is a certified trainer as well and has provided more than 10 successful private and public training sessions to 70+ trainees. He has six+ years of industrial experience. He is leading the Liferay Certification Program at his organization.

Books From Packt


Liferay Portal Systems Development: RAW
Liferay Portal Systems Development: RAW

Liferay Portal 6 Enterprise Intranets
Liferay Portal 6 Enterprise Intranets

PHP and CouchDB Web Development Beginner’s Guide
PHP and CouchDB Web Development Beginner’s Guide

Alfresco Developer Guide
Alfresco Developer Guide

Alfresco Share
Alfresco Share

Alfresco 3 Web Services
Alfresco 3 Web Services

Alfresco 3 Web Content Management
Alfresco 3 Web Content Management

Liferay User Interface Development
Liferay User Interface Development


No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
X
L
E
h
1
N
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software