Embedding an HTML Page as a Liferay Portal Page

This article describes how to use the HTML embed pages functionality. Liferay Portal pages are not just for displaying portlets. Users can also embed HTML documents as pages. It is up to the user to ensure that the CSS, JS, and image paths on their HTML page are correct; the Liferay platform does not validate any HTML or XML pages.

If the HTML page does not appear and instead a Status Not Found error displays, users should check that the URL path is correct.

Resolution

  1. Create or locate a HTML web page that the user wants to embed as a portal page.
  2. Create new a folder that is in the same folder where the ROOT (or its equivalent) folder is located. Place the HTML resource in this folder.
  3. Start Liferay Portal
  4. Navigate to Control Panel > Sites
  5. Create a new site.
  6. Navigate to the new site > Site Pages
  7. Create a new page with the following details:
    1. Name: {page name}
    2. Type: Embedded
    3. URL: http://{URL}:8080/${folder name}/${name of the HTML file} (e.g. http://localhost:8080/test/embedded-page.html)
  8. Navigate to the new site. The first page is the HTML page.

Additional Information

Users might experience truncation when printing the page; no content is printed after the first page. This is a browser specific issue. See https://issues.liferay.com/browse/LPS-16523.

Users cannot use embedded pages as a page template by default.

这篇文章有帮助吗?
1 人中有 0 人觉得有帮助