- Liferay Beginner’s Guide
- Robert Chen Sandeep Nair Samir Bhatt
- 1411字
- 2021-08-27 12:04:36
Time for action – signing in to Liferay Portal
So far, you have started the server and understood the Liferay Sign In portlet. Now, let's log in to Liferay Portal for the first time. Follow these steps to sign in to Liferay with default admin credentials:
- Use the following credentials to log in to Liferay and then click on the Sign In button:
- User Name: test@liferay.com
- Password: test
- The first page you will see is the Terms of Use page. This is a page which mentions all the terms and conditions of your portal. A user has to agree to these terms before accessing the portal. Go ahead and agree to the terms of use by clicking I Agree.
- The next page that you will see is the Password Reminder Query page. You can set the password reminder query and the answer to recover the password, in case you forget it. Choose your question and provide an answer; click on Save to set your reply.
- You will now be able to see the home page of Liferay.
What just happened?
You have started Liferay Portal and logged in with default user credentials—User Name: test@liferay.com and Password: test.
Before accessing the home page, you agreed to the Terms of Use of the portal. This page will be displayed to the user when he or she logs in for the first time. This page can be modified to display organization-specific terms of use. A portal admin can turn this feature off, if it is not required by the portal.
You also agreed to the password reminder query, which is used to recover your password if you forget it. This feature can also be turned off by the portal administrator.
Getting familiar with the Dockbar
Once you agree to the Terms of Use and provide the password reminder query, you will see the home page. This page is also called the default landing page. The default landing page is the page that is displayed first after logging in. This can be configured through the portal configuration. We will discuss this in a later chapter. You will also notice that now you can see the horizontal Dockbar, which appears across the top of the page as displayed in the following screenshot:
The Dockbar is key to navigating in Liferay. A user can use this Dockbar to navigate and access the admin functions. The Dockbar is available on all the pages, so a user can navigate from anywhere in the site. The access to Dockbar is modular, which means that, based on the role that a user has, one can access all of its options or just a few. Currently, you have logged in as an admin user, so you will be able to access all the options of the Dockbar.
We will now discuss all the options of the Dockbar in detail.
The Add option
The first icon that you will see in the Dockbar is a pin-like icon which is displayed in the previous screenshot, first from the left before the Add option. This pin is used to decide if you want to see the Dockbar when you scroll down your page. If you click on this pin, it will always display the Dockbar on the top of the page even if you scroll down. If the pin is not pressed, the Dockbar will not appear if you scroll down your page.
The second option you will see in the Dockbar is Add. Just scroll your mouse over the Add button. On doing so, you will find a list of items which you can add as displayed in the next screenshot. The options are divided into two broad areas—Page and Applications. When you click on Page, it will add a new page to the same level as you are. You can also see the newly added page in the page navigation.
The second area is Applications, which is a portlet in the portal world. By default, it displays four commonly-used portlets—Web Content Display, Asset Publisher, Document Library Display, and Navigation portlets. You can directly click on the portlet to add it to the page. Alternatively, you can drag the portlet and drop it to the page. You can also change the list of the default portlets by modifying the dockbar.add.portlets
property in the portal-ext.properties
file. You need to specify the portlet ID in a comma-separated list.
We have discussed how to add the most common portlets to the page. There will never be a case when you will only need these four portlets in your portal. You normally need a lot more portlets to be added to the page to achieve your required functionalities. If you want to add any other portlet apart from the four common portlets, you can click on the More option. When you click on it, a pop-up will be opened with the list of all the portlets available in Liferay. It is displayed in the next screenshot:
You will see a list of categories in the pop-up. Liferay comes with more than 60 portlets pre-bundled. All the portlets are divided into different categories, for example, Web Content. The Display portlet is part of the Content Management category and the Blogs portlet is a part of the Collaboration category. You can see a list of portlets by clicking on the plus sign next to each category. As mentioned earlier, you can directly click on the Add button next to the portlet to add the portlet to the page or drag it and drop it to the page.
This pop-up also provides the functionality to search for portlets. If you know the name of the portlet which you want to add to the page but are not sure about the category it falls in, then you can simply write the name of the portlet in the search box which appears below the text Search applications (Searches as you type) in the pop-up, and it will display the category and the portlet as a result as you type in.
Have you noticed any difference between the portlet icons when you click on different categories? Not yet! Try clicking on the Content Management category. You will notice that there are some portlets such as Asset Publisher and Breadcrumb which have green icons; while other portlets such as Document Library and Image Gallery have purple icons. What is the significance of these colors?
Well, all the portlets with a green icon are instanceable portlets. This means you can have multiple instances of this portlet on a page and within a community or organization and each of the instances can hold different data.
Portlets with a purple icon are non-instanceable portlets, meaning you can only have one instance of this portlet across an organization or community. You cannot add this portlet more than once to the page. Also, they share the same or common data within the organization or community that they are in.
We will discuss organization and community later in this chapter.
As discussed, Liferay comes with more than 60 portlets pre-bundles. If you want to install more portlets/applications, it can also be done from the Install More Applications link provided on the Add Application pop-up. When you click on this link, it will take you to the Control Panel | Plugin Installation interface. You can add new applications (portlet, theme, layout, hooks, and so on) from this screen. It is displayed in the following screenshot:
This interface is divided into different tabs as follows:
Tabs displayed in the top:
- Browse Repository—This will browse through all the different types of plugins from the repository configured under the Configuration tab. This tab has the following options:
- Portlet Plugins—Displays a list of the portlets available in the repository
- Theme Plugins—Displays a list of the theme plugins available in the repository
- Layout Template Plugins—Displays a list of the different layouts available in the repository
- Hook Plugins—Displays a list of the different hook plugins available in the repository
- Web Plugins—Displays a list of web modules available in the repository
- Upload File—Allows you to upload a WAR file for a new theme, layout, or portlet.
- Download File—Allows you to specify the URL from which a new portlet, theme, or layout can be downloaded.
- Configuration—This has a different configuration option for the Liferay Portal Server.