!--a11y-->
Creating a layoutTemplate.jsp
File 
The layoutTemplate.jsp file is one of the mandatory files that comprise the PAR file for creating a new layout template. layoutTemplate.jsp is a generic name and you are not obligated to use it, except for the .jsp extension. If you package several .jsp files (layouts) in the same PAR file, each must have its own name.
You are familiar with the information contained in Portal Page at Runtime.
...
Use the information in the Layout Tag Library and Container sections below, and in the example provided, to create your own layoutTemplate.jsp file.
The layout tag library is used by the PageLayout component to:
· Insert the required code for a portal page into the .jsp file
· Place iView content on a page according to the location of containers as defined in the .jsp file
The following tags are part of the layout tag library: Container; Template; taglib uri.
Tag Library
Tag |
Function |
Syntax |
Properties / Variables |
Container |
Places a layout container in the jsp flow |
<lyt:container id="the_container_id" /> |
id - the container identifier; a meaningful page-unique name for the container. The name should not contain any spaces or special characters. There are other container properties, but they are placed in the portalapp.xml file. |
Template |
Wraps the entire layout template content |
<lyt:template> ..... </lyt:template> |
epPageVariables - a utility-scripting variable; see the following section for details. |
taglib uri |
Points to the tag library definitions |
<%@ taglib uri="prt:taglib:com.sap.portal .reserved.layout.TagLibLayout" prefix="lyt" %> |
|
epPageVariables is a utility-scripting variable provided by the Template tag. It serves the following two purposes:
· Accesses the portal UserAgent service (com.sap.portal.useragent.UserAgentService) to detect the user agent in use. It enables differentiating code segments according to the requested user agent (browser type, version, and so on).
· Resolves whether layout.jsp is currently being used for RunTime or DesignTime purposes, and conditions the code accordingly.
As the portal includes a WYSIWYG Page Layout Editor, the same layout template is used for both running the page (RunTime) and presenting the page in the Page Editor (DesignTime).
The RunMode parameter enables differentiating code segments according to the current use.
The scope of epPageVariables is from the beginning of the Template tag to the end of the .jsp file.
A layout container represents a column of iViews. You use the <lyt:container> tag to position the layout container in the layoutTemplate.jsp file. When the HTML page is created, the container is rendered as an html <table>, with a row for each iview.
The arrangement of layout containers on the page is flexible and is set by the jsp html wrapping the <lyt:container> tags.