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:
-
In the Menu (
), open The Lunar Resort → Navigation.
-
Click the Options button (
) next to Public Pages and select Add Public Page.
-
Name the page Hazard Disclaimer.
-
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.
-
In the Type selector, select Templates → Content Display Page.
-
Set the Inherit Changes toggle to NO.
-
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:
-
In the Menu (
), select The Lunar Resort → Content → Web Content.
-
Click the Add icon (
) at the bottom-right of the page and select Basic Web Content.
-
Name the content Hazard Disclaimer.
-
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.
-
Open the Display Page section and click Choose.
-
Select the Hazard Disclaimer page, and click Done.
-
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:
- Go to the Book a Trip page and use the Add menu
(
) to add an Asset Publisher app to the page.
-
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.
-
Open the Asset Publisher’s Configuration dialog.
-
Under Asset Selection choose Manual.
-
Open the Asset Entries section and click Select → Basic Web Content.
Figure 1: Selecting individual content for display.
-
Select Hazard Disclaimer.
-
Click Save.
-
Still in the Asset Publisher’s Configuration dialog, click the Display Settings tab.
-
In Asset Link Behavior, select View in Context.
-
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.
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.