How to Create a Custom Layout
A layout consists of a layout JSP page and a portalapp.xml file. The files are packaged in a portal application (PAR file) and deployed to the portal.
You can define several layouts in a single PAR by providing for each layout a JSP page and a <component>element in the portalapp.xml file.
...
1. With the help of the layout tag library, create a JSP page that defines the following:
¡ One or more containers on the page in which iViews can be placed.
¡ The iView tray, or frame, in which each iView is placed. If you do not specify a tray, the portal displays the default tray, which provides links to standard tray functions, such as hiding, refreshing or personalizing the iView.
You can specify one tray for each container. The tray is displayed for all iViews in the container.
¡ Additional HTML that appears on each page.
For more information on creating a layout JSP page, see Layout Tag Library.
2. Create a <component>element in a portalapp.xml file for the PAR and set the name attribute. Create one <component> element for each layout defined in the PAR.
In the <component>element’s <component‑config> element, create the following <property>elements:
Property |
Mandatory |
Description/Value |
ClassName |
Yes |
com.sapportals.portal.pb.layout |
ResourceBundleName |
Yes |
pagebuilder_nls |
In the <component>element’s <component‑profile> element, create the following <property>elements:
Property |
Mandatory |
Description/Value |
ComponentType |
Yes |
com.sapportals.portal.layout |
com.sap.portal.pcm.Title |
No |
The display name of the layout |
com.sap.portal.pcm |
No |
A layout description |
com.sap.portal.reserved |
Yes |
The name of the JSP page that defines the layout (relative to the PORTAL-INF\jsp directory) |
com.sap.portal.reserved and so forth |
Yes |
Each container defined in the JSP must have a property in the portalapp.xml. The names of these properties should end in ContX, where X is a sequence number starting at 1. The value is a name for the container. |
com.sap.portal.reserved |
Yes |
/SERVICE/com.sap.portal |
com.sap.portal.reserved |
Yes |
/SERVICE/com.sap.portal.htmlb/ Only required if using the default iView tray or adding HTMLB tags to the JSP page. |
For each container profile property described above, you can include the following meta-properties:
Property |
Mandatory |
Description |
plainDescription |
Yes |
The display name of the container |
orientation |
Yes |
Container orientation, which must be set to vertical |
designClass |
No |
A CSS class for the HTML table created by the container (<table class="...">) |
3. Create a PAR file with your JSP pages and deployment descriptor. Place the JSP pages in the PORTAL‑INF/jsp directory.
4. Deploy the PAR file.