Define and render a static portal page in HTML
To include a new static portal page in the portal, first create an HTML file.
We can create this page by starting with a static HTML file or an HTML fragment.
- The static HTML file can contain references to portlets, containers, and navigation. It defines the 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 defining metadata for these portlets, for example, portlet actions and the portlet title. The portal provides the following microformats:
portlet microformat Portlet windows and portlet actions, including edit default settings, configure, maximize, minimize, personalize, delete container microformat Portlet containers as placeholders for portlets. navigation microformat Nhe navigation if the static page is rendered as a web page.
- For drag-and-drop actions, the portlet microformat can provide the drag source, and the container microformat provides the drop target.
The portlet window and portlet container microformats can contain object IDs. The server can handle these object IDs dynamically.
We can use CSS or JavaScript techniques to produce and render a user friendly user interface.
- We 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.
- We 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 compressed file. This single compressed file is then used to create or update the static page.
- We can use portal frameworks such as Live Text with your static pages. To achieve this, include the static page as part of a dynamic portal page when we add the static page to the portal in a later step.
- To enable globalizatione for representing the static page in different languages or locales, bundle localized static markup files into a compressed file.
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, you need to 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.
- To enable device support, which represents your static page for different device classes, bundle the static markup file that are device-class-specific into a compressed file. Observe the following naming conventions for the device-specific files:
- For a base file base_file_name.file_name_extension
- Name the device-specific version of the file base_file_name_device.file_name_extension.
For example, for a base file named my_page.html, the smartphone-specific version of the file is my_page_smartphone.html, and the tablet-specific version of the file is my_page_tablet.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 device-specific version of the resource when appropriate.
- For localized, device-specific files
- For a base file named my_page.html, the smartphone-specific English version of the file is my_page_smartphone_en.html, and the smartphone-specific US English version of the file is my_page_tablet_en_us.html.
These naming conventions also apply for the definition of static portal pages in HTML.
When we use only characters that can be encoded in ASCII in the names of the compressed file and the directories and files within the compressed file, we can use a compressed tool of your choice to create the file package. If we use characters that are not ASCII encoded, for example special characters or DBCS, in the names of the compressed file and the directories and files within the compressed file, create the compressed file 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
- Class attributes for a portlet container on static pages
- Class attributes for components on static pages
- Class attributes for iWidgets on static pages
- Navigation options for static pages
- Portlets for adding dynamic elements to static pages