Creating Widget Pages

Widget Pages are the classic type of page in Liferay DXP. They’re simple to create and fill with content or functionality. You create a blank page, define a layout, and then add widgets to the layout. Widgets can display content or provide some tool or function for Users.

Adding a Widget Page

When you first start Liferay DXP you get a widget page by default as your home page. To create a new widget page,

  1. Go to Site AdministrationBuildPages.

  2. Click the Add icon ( Add) in the top right and select Public Page to add a new page.

  3. Select Basic Pages if it is not selected by default.

  4. Select the Widget Page type.

  5. Name the page Community and leave the box checked to Add this Page to the following Menus: Default.

  6. Click Submit.

  7. On the next screen, you can select a Layout Template or manage other options. Leave the defaults and click Save.

Figure 1: Create a page called Community with two columns.

Figure 1: Create a page called *Community* with two columns.

Creating a page by default also adds it to any Navigation Menus that are configured to have new pages added to them. If you don’t want a new page added to a specific Navigation Menu that is listed during page creation, uncheck the box for that menu.

Your new page is now added to the navigation.

  1. Click the logo in the top left of the page to go back to your Site’s front page. The page you just created appears in the main navigation.

  2. Click on Community to go to the page.

Currently the page is empty. Next you’ll add some widgets to give it functionality.

Figure 2: Your page has been added to the navigation automatically.

Figure 2: Your page has been added to the navigation automatically.

Adding Widgets to a Page

To add widget to a page, go to the page and click the Add button (Add) from the top menu and select the Widgets tab. You can either browse through the categories of available widgets until you find the one you want, or you can search for widgets by name. Once you’ve found a widget, click the Add button to add it to the current page. Once there, you can drag it to a new position. Alternatively, you can drag the widget directly from the Widgets menu to a specific location on the page. Follow the steps below to add some Collaboration apps to the Lunar Resort Site.

  1. From the top menu, select AddWidgets.

  2. In the menu that appears, expand the Collaboration category.

  3. Drag the Blogs Aggregator widget onto the right column of your page.

  4. Next, drag the Wiki app to the left column.

See how easy it is to add applications to your pages? You’ve added the Wiki app and Blogs Aggregator app to a page.

Figure 3: Your page layout options are virtually limitless with a slew of application and layout combinations.

Figure 3: Your page layout options are virtually limitless with a slew of application and layout combinations.

If the default layout options provided aren’t enough, you can create your own. For more information about developing custom layout templates, see the tutorial Layout Templates with the Liferay Theme Generator.

Next, you’ll look at creating reusable templates for widget pages.

« Using Widget PagesCreating Widget Pages from Templates »
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています