Documentation
Liferay provides a rich store of resources and knowledge to help our community better use and work with our technology.
Creating the Nose-ster pages
There are a lot of other things you can do beyond placing portlets on a page. So let's start working on the Nose-ster site. You can do this by going up to the Dockbar and clicking Go to → Nose-ster.
We'll use the Community page you created earlier in the chapter. Navigate to the Community page and select Manage → Page from the Dockbar.
This screen should now be familiar to you, but let's recap.
The Page tab allows you to:
- Change the name of the page
- Enter HTML code for the title
- Choose the page type
- Hide the page from the theme navigation
- Define a friendly URL to the page
- Choose an icon to be displayed
- Choose a frame target for the page
- Copy an existing page
You can also enter custom meta tags or JavaScript to the page if you're a web developer. Additionally, if you click the Permissions button, you can define which users, groups, roles, or organizations can view or edit the page.
The Children tab lets you create child pages underneath the page you've selected. You can nest pages as deep as you like, but for every page below the top level hierarchy, you must provide navigation to it via a Navigation or Breadcrumb portlet, at least with most themes (including the default). Developers can create themes which have cascading menu bars which show the full hierarchy, and some examples of that are in Liferay's plugin repositories.
For now, click Return to full page. You should be able to define and manage pages in Liferay at this point, so let's look at what you'd put on a page.
Portlets
As we discussed earlier, Liferay Portal pages are composed of portlets. All of your site's functionality, from blogs to shopping, is composed of portlets.
Adding portlets to a page is simple. Let's add some to our Collaboration page.
- In the Dockbar, select Add → More.
- In the menu that appears, expand the Collaboration category.
- Drag the Blogs Aggregator portlet off the Add Application window onto the right column of our page.
- Next, drag the Wiki portlet to the left column.
See how easy it is to add applications to your pages? We've gone one step further: we've got the Wiki portlet, the Blogs Aggregator portlet, and then a nested portlet with a different layout and the Alerts, Search, and Dictionary portlets in the figure below.
Figure 2.11: Yeah, we're showoffs. But as you can see, your page layout options are virtually limitless.
You'll find it's easy to make your pages look exactly the way you want them to. If the layout options provided aren't enough, you can even develop your own. More information about that can be found in Liferay's official guide to development, Liferay in Action.
Page Permissions
By default, public pages are just that: public. They can be viewed by anybody, logged in or not logged in. And private pages are really only private from non-members of the site. If someone has joined your site or is a member of your organization, that person can see all the private pages. You can, however, modify the permissions on individual pages in either page group so that only certain users can view them.
Let's say we wanted to create a page only for administrators to see. We can do this with the following procedure:
- Go to the Dockbar and select Manage → Control Panel.
- Ensure that you've selected the default site in the context selector.
- Click the Site Pages link.
- Click the Private Pages tab to switch to the Private Pages. Remember, these pages by default are viewable only by members of the site.
- Create a page called Admin Tips.
- Click on the page in the tree on the left and then click Permissions.
- Uncheck the View and Add Discussion permissions next to the Site Member role.
- Click the Save button.
Figure 2.12: Permissions for Admin Tips
Congratulations! You've just changed the permissions for this page so that only site administrators can view it. Any users you add to this role can now see the page. Other users, even members of this site, won't have permission to see it.