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.
Procedure
-
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 .
-
-
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.PageLayout
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.Description
No
A layout description
com.sap.portal.reserved.layout.TemplateFile
Yes
The name of the JSP page that defines the layout (relative to the PORTAL- INF \jsp directory)
com.sap.portal.reserved.layout.Cont1, com.sap.portal.reserved.layout.Cont2,
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.layout.TagLibLayout
Yes
/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld
com.sap.portal.reserved.layout.TagLibHtmlb
Yes
/SERVICE/com.sap.portal.htmlb/taglib/htmlb.tld
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="..."> )
-
Create a PAR file with your JSP pages and deployment descriptor. Place the JSP pages in the PORTAL‑INF/jsp directory.
-
Deploy the PAR file.