There are three types of gear title templates: one for displaying a gear title bar, one for displaying HTML to be rendered immediately before gear output (gear pre-treatment), and one for displaying HTML output to be rendered immediately after gear output (gear post-treatment). One of each type of gear title template is provided:
titlebar.jsptitlebar-pre.jsptitlebar-post.jsp
Gear Title Template Example
The following code samples come from the titlebar.jsp file. The title bar displays the gear name and optional Edit, About, and Help links.
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" bgcolor="<c:out value="${gearTitleBackgroundColor}"/>"
width="78%">
<font color="<c:out value="${gearTitleTextColor}"/>">
<c:out value="${gearName}"/>
</font>
</td>
<td align="right" bgcolor="<c:out value="${gearTitleBackgroundColor}"/>"
width="22%">The next section optionally displays an Edit link for the gear, if the gear has been configured to be customizable by the user:
<c:if test="${showEdit ==true}">
<%
gearContext.setGearMode(GearMode.USERCONFIG);
%>
<a href="<%= gearServletResponse.encodeGearURL
(gearServletRequest.getPortalRequestURI(),gearContext) %>">
<font color="<c:out value="${gearTitleTextColor}"/>">
<fmt:message key="titlebar-control-edit" bundle="${templatesbundle}"/></font></a>
</c:if> The next section optionally displays an About link for the gear:
<c:if test="${showAbout == true}">
<%
gearContext.setGearMode(GearMode.ABOUT);
%>
<a href="<%= gearServletResponse.encodeGearURL
(gearServletRequest.getPortalRequestURI(),gearContext) %>">
<font color="<c:out value="${gearTitleTextColor}"/>">
<fmt:message key="titlebar-control-about" bundle="${templatesbundle}"/></font></a>
</c:if> The next section optionally displays a Help link for the gear:
<%
gearContext.setGearMode(GearMode.HELP);
%>
<c:if test="${showHelp == true}">
<a href="<%= gearServletResponse.encodeGearURL
(gearServletRequest.getPortalRequestURI(),gearContext) %>">
<font color="<c:out value="${gearTitleTextColor}"/>">
<fmt:message key="titlebar-control-help" bundle="${templatesbundle}"/></font></a>
</c:if>
