Defining and rendering a static portal page in HTML
To include a new static portal page in the portal, first create an HTML file.
You can create this page by starting with a static HTML file or an HTML fragment. You can do all of the following:
- The static HTML file can contain references to portlets, containers, and navigation. Places in the portal page that host portlets or portlet containers. When the page is rendered, these places are filled by the server with the - possibly dynamic - content of portlet and with a microformat that defines metadata for these portlets, for example, portlet actions and the portlet title.
For this purpose, the portal provides the following microformats:
- The portlet microformat. This defines portlet windows and portlet actions, such as Edit default settings, Configure, Maximize, Minimize, Personalize, and Delete.
- The container microformat. This defines portlet containers as placeholders for portlets.
- For drag-and-drop actions, the portlet microformat can provide the drag source, and the container microformat provides the drop target.
- The navigation microformat. Navigation if your static page is rendered as a Web page.
The portlet window and portlet container microformats can contain object IDs. The server can handle these object IDs dynamically.
When you write the static page, you can use CSS or JavaScript techniques that utilize the microformats to produce and render a user friendly user interface.
- You can define whether the static page is rendered as a Web page or as part of a portal page:
- To render the page as a standalone static page, include the <html> element as a root element in the markup file.
- To render the page as part of a portal page, omit the <html> element.
- You can also include other resources as part of the page, such as cascading style sheets or graphic images. You need to bundle all the files into a ZIP file. This single ZIP file is then used to create or update the static page.
- You can use portal frameworks such as Live Text with your static pages. To achieve this, include your static page as part of a dynamic portal page when you add the static page to the portal in a later step.
- To enable globalization, that is to represent your static page in different languages or locales, you bundle localized static markup files into a ZIP file. For example, these can be HTML files, graphic files, such as JPGs, style sheets such as CSS or JS files. Observe the following naming convention for your localized files: For a base file base_file_name.file_name_extension, name the localized version of the file base_file_name_locale.file_name_extension. Example: For a base file named my_page.html, the English version of the file is my_page_en.html, and the US English version of the file is my_page_en_us.html. Although these files have different file names, they logically represent the same resource and are referenced by references to their base name.
The portal serves the localized version of the resource when appropriate.
When you use only characters that can be encoded in ASCII in the names of the ZIP file and the directories and files within the ZIP file, you can use a ZIP tool of your choice to create the file package. If you use characters that are not ASCII encoded, for example special characters or DBCS, in the names of the ZIP file and the directories and files within the ZIP file, create the ZIP file by using the JRE tool jar.exe.
- Example HTML markup for defining a portal page
Use these code samples as examples of HTML markup to create a portal page.
- Class attributes for portlets on static pages
When you place a portlet on a static HTML page to be rendered by the portal, use a suitable CSS file to format the portlet. The CSS file makes use of the portlet microformat. You can make use of this microformat if you want to render portlets on your static HTML page with a skin of your choice. When you write the static page, you can use CSS or JavaScript techniques to convert the microformat into a friendly user interface. The portlet references in the static HTML page are replaced by the content of the portlet and the portlet microformat.
- Class attributes for a portlet container on static pages
To render a portlet container on a static page, you use a CSS file that makes use of the container microformat. One of the benefits is that users with the required access rights can later move the portlets by drag and drop.
- Navigation options for static pages
You can provide navigation for your static pages by using either the portal theme or by making use of the navigation microformat.
- Portlets for adding dynamic elements to static pages
To add dynamic elements such as portal navigation to your static pages, you can use portlets that the portal provides.
Parent topic:
Creating static content for the portal