In the previous sections, you created and edited an article. Now it’s time to publish it.
-
Go to the Welcome page of the Lunar Resort Site.
-
Select the Add button (
) from the top Control Menu and select the Widget tab.
-
Find Web Content Display and add it to the page.
You can drag a widget to the position on the page where you want your content
to appear. You can have as many Web Content Display widgets on a page as you
need, which gives you the power to lay out your content exactly the way you
want it.
Figure 1: Add the Web Content Display app to a page to begin displaying your new web content article.
Now select the content to display:
-
Click Select Web Content to make it visible in the bottom of the widget.
-
Click Select under Web Content.
-
Click on the article that you want to display
If your content does not immediately appear in the list, you can search for the content by title, description, user name, or Site (click the drop-down arrow to see all the options).
Selecting a web content article displays the Web Content Display’s configuration page, where you can choose the User Tools and Content Metadata to be published in the widget. These two entities have the following options to choose from, by default:
- User Tools
- Translations
- Content Metadata
- Related Assets
- Ratings
- Comments
- Comment Ratings
If you have enabled OpenOffice/LibreOffice integration, you can also enable document conversion for your content. Then users can download your content in their format of choice. To enable OpenOffice/LibreOffice integration, go to Control Panel → Configuration → System Settings → Connectors and check the Server Enabled box. Back in the Web Content Display’s configuration page, conversion options are available under the User Tools list.
Figure 2: Publishing web content is a snap. At a minimum, you only have to select the content you wish to publish. You can also enable lots of optional features to let your users interact with your content.
Translations: Shows the available locales for your content. If you’re working on the page for a particular language, you can select the translation of your content that goes with your locale.
Print: Opens the content in a separate browser window with just the content—no navigation or other widgets.
Ratings: Shows one of two ratings interfaces Liferay DXP has: five stars or thumbs up and thumbs down. Rating types are configured in Site Menu → Configuration → Site Settings.
Comments: Creates a discussion forum attached to your content.
By default, guests cannot leave comments on web content. If you want to allow guests to comment on your web content article,
-
Navigate to the Control Panel → Users → Roles
-
Select Guest → Define Permissions.
-
From the left menu, select Site Administration → Content → Web Content.
-
Navigate down to the Web Content Article heading and select the Add Discussion checkbox. Click Save.
Guests can now post comments on your web content article!
You may decide you want one, some, or none of these features, which is why they’re all implemented as simple selector buttons to be enabled or disabled at need. Once you’ve selected the features you want to include in your Web Content Display widget, click Save and close the configuration window.
Editing Published Content
If you must edit published content, you can do it directly from the Web Content Display app or from Site Administration. To edit it from the Web Content Display app,
-
Select the Options button (
) from the widget’s top panel.
-
Select Edit Web Content to launch the editor. Select Edit Template to launch the template editor for the web content article’s template.
Figure 3: You can select and edit an article, or edit its template directly from the Web Content Display app.
If you edit the article from Site Administration, you can also view the article’s history and use the diff tool to compare versions.
-
Go to Content → Web Content from the Menu.
-
Next to the article, click Actions icon (
) and select View History. This shows you
This shows you all the article’s versions and modified/display dates. The diff tool compares these versions and highlights the differences between them.
-
Click Actions next to a version of the article you’d like to compare.
-
Select Compare to….
-
Select the version with which to compare it.
The tool provides color coded highlighting to emphasize additions and deletions between the two articles.
Whenever you publish updates to a web content article that’s already being
displayed, the content is immediately updated unless you have a workflow
enabled (See
Workflow
for details).
Figure 4: Comparing web content articles is a great feature to use during the Workflow process.