Publishing Content with Content Display Pages

Creating Content
Step 4 of 7

So far, you’ve manually published most of your site’s content. Now you’ll use content display pages to publish content automatically. Liferay DXP’s Asset Publisher app makes this possible. You can configure the Asset Publisher to automatically publish any type of asset (e.g., images, blogs, web content). A content display page is simply any page that contains an Asset Publisher app configured to display the page’s associated content. Because the Asset Publisher is highly configurable, you can create a content display page that displays one or many pieces of content.

First, you’ll create a simple content display page for displaying a single piece of content.

Creating a Content Display Page

Follow these instructions to create the content display page:

  1. In the Menu (Product Menu), open The Lunar ResortNavigation.

  2. Click the Options button (Options) next to Public Pages and select Add Public Page.

  3. Name the page Hazard Disclaimer.

  4. Set the Hide from Navigation Menu toggle to YES. This hides the page from the main navigation, meaning that users can only access the page directly via a link. This means that to the user, the page is synonymous with its content.

  5. In the Type selector, select TemplatesContent Display Page.

  6. Set the Inherit Changes toggle to NO.

  7. Click Add Page.

Nice! Now you’re ready to create the page’s content.

Creating the Display Page’s Content

Use these steps to create the page’s content:

  1. In the Menu (Product Menu), select The Lunar ResortContentWeb Content.

  2. Click the Add icon (Add) at the bottom-right of the page and select Basic Web Content.

  3. Name the content Hazard Disclaimer.

  4. In the Content field, enter the following:

    Potential Hazards of Space Travel and Lunar Exploration include but are not limited to:
    
    Accidental ejection from airlock into the cold vacuum of space
    Spacesuit failure
    Spacecraft engine explosion
    Running and jumping so fast that you achieve escape velocity and are no longer bound by the moon's gravity
    Accidental exposure alien spores or eggs
    Collisions with stray meteorites
    Excess exposure to solar radiation
    Muscular atrophy
    
    Neither the The Space Program, The Lunar Resort nor any of the their subsidiaries are responsible for injury or harm caused by these or similar accidents.
    
  5. Open the Display Page section and click Choose.

  6. Select the Hazard Disclaimer page, and click Done.

  7. Click Publish.

Awesome! Now that your content exists on the display page, you’ll configure a link to it so that users can view it.

Using Content Display Pages

You’ll display the content via a link in an Asset Publisher. To do so, follow these steps:

  1. Go to the Book a Trip page and use the Add menu (Add) to add an Asset Publisher app to the page.
  1. Click the Asset Publisher’s title (just beneath the portlet bar that appears on mouse-over) to edit it and change it to Waivers and Disclaimers.

  2. Open the Asset Publisher’s Configuration dialog.

  3. Under Asset Selection choose Manual.

  4. Open the Asset Entries section and click SelectBasic Web Content.

    Figure 1: Selecting individual content for display.

    Figure 1: Selecting individual content for display.

  5. Select Hazard Disclaimer.

  6. Click Save.

  7. Still in the Asset Publisher’s Configuration dialog, click the Display Settings tab.

  8. In Asset Link Behavior, select View in Context.

  9. Click Save and then close the configuration dialog.

A summary of your content now appears in the Asset Publisher, with a link that takes you to the content display page containing your full content. The content display page also provides a friendly URL to your content that you can share.

Figure 2: Your content now appears in the asset publisher.

Figure 2: Your content now appears in the asset publisher.

Right now, you’re using the content display page’s default configuration. You can also configure the page to look however you want, or turn an existing page into a content display page. That’s what you’ll do next.

« Advanced TemplatesAdvanced Content Display Page Options »
この記事は役に立ちましたか?
1人中1人がこの記事が役に立ったと言っています