Page Templates

Previous
Previous
Next
Next

Page templates define the appearance of a page. Each template consists of a header template, a body template, a footer template, and a number of subtemplates. If you do not specify a page template as a page-level attribute, then the Application Express engine uses the default page template defined on the Define Theme page.

Page templates combine static HTML with substitution strings that are replaced at run time. You use substitution strings to indicate the existence and placement of a component within a page template. You can further specify how a component should display using subtemplates.

Topics:

Supported Page Template Substitution Strings

Table: Page Template Substitution Strings describes the available page template substitution strings. Note that all template substitution strings must be in uppercase letters and begin and end with a number sign (#).

Page Template Substitution Strings

Substitution String Description

#APP_VERSION#

Can be used in the Header or Footer sections of the page template. You define the value of #APP_VERSION# in the Version attribute on the Edit Application Attributes page

See Also: "Name"

#BOX_BODY#

Identifies where the Body displays. If the Body is null, then #BOX_BODY# will be used instead.

#CUSTOMIZE#

Can be used in the Header, Body, or Footer sections of the page template.

The Customization section of the Region Definition enables you to turn on end user customization. To utilize this feature, you must also include the #CUSTOMIZE# substitution string in the page template.

If at least one region supports end user customization, a link called Customize appears wherever the #CUSTOMIZE# substitution string appears in the page template. When users click this link, a window displays enabling them to turn on and off regions on the page.

See Also: "How Region Attributes Affect Page Layout"

#FORM_CLOSE#

If a #FORM_OPEN# is included, then you must include a #FORM_CLOSE# in the header, body, or footer template. #FORM_OPEN# must appear before the #BOX_BODY# and #FORM_CLOSE# must appear after the #BOX_BODY# substitution string.

#FORM_OPEN#

Specifies where the HTML open form tag <form> is placed. You must include this substitution string in order to submit a form.

You do not need to code your own form open, the Application Express engine does it for you.

#GLOBAL_NOTIFICATION#

Displays the Global Notification attribute. Global notifications are intended to communicate system status, such as pending system downtime. You can also use HTMLDB_APPLICATION.G_GLOBAL_NOTIFICATION to set this value if you want to set it programmatically.

See Also: "Global Notifications" for information about the Global Notification attribute

#HEAD#

Used after the <head> open tag, but before the </head> close tag. You can optionally define the contents of #HEAD# for each page (for example, to reference additional style sheets or JavaScript libraries).

#LOGO#

Identifies an application logo.

In the Logo section of the Edit Application Attributes page, you can identify an image and image attributes for an application logo. To utilize this feature, you must also include the #LOGO# substitution string in the Header or Body page template.

See Also: "Logo"

#NAVIGATION_BAR#

Defines the existence of navigation bar entries. A navigation bar will appear on every page in your application that uses a template that includes this substitution string.You can expand this substitution string using the Navigation bar subtemplate.

See Also: "Subtemplate" for information about Navigation Bar subtemplate

#NOTIFICATION_MESSAGE#

Enables developers to communicate messages to the user. Defines where a summary of inline error messages is displayed. Inline error messages can be displayed next to a field, inline in the notification area, or both.

#ONLOAD#

Can be used in the Header and Footer section of the page template and should be placed inside the <body> html tag. For example:

<body #ONLOAD#>

Use this string as a substitute in a JavaScript call to be executed when a page is loaded by the Web browser. The JavaScript to be called can vary for each page.

#PARENT_TAB_CELLS#

Identifies the display of parent tabs. Parent tabs require standard tabs. If your application only has one of level tabs, you do not need this substitution string.

See Also: "Standard Tab Attributes" for information about defining Parent Tab Attributes

#REGION_POSITION_NN#

Identifies the exact placement of regions within a page. If no region is specified (for example, #REGION_POSITION_01#), then #REGION_POSITION_01# will be replaced with nothing.

#SUCCESS_MESSAGE#

Defines where in the page success and error messages appear. If the page process runs without raising errors, then this text displays.

You can customize the display of the success message for each template by adding HTML to be displayed before and after the success message.

#TAB_CELLS#

Identifies the display of standard tabs.

See Also: "Standard Tab Attributes"

#TITLE#

Defines the page title. Typically included within HTML title tags.


Page Template Attributes

This section describes specific sections of the Page Template page.

Name

Name identifies the name of the template. Use the Translatable check box to indicate that the template contains text strings that require translation. Theme indicates the theme to which the template is a member.

Template Class identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.

Subscription

Use Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a new copy of a master template, select Refresh.

Definitions

Each template consists of a header, a body, a footer, and subtemplates. Use substitution strings to include dynamic content. All template substitution strings must be in uppercase letters and begin and end with a number sign (#). See item Help for information about supported substitution strings.

Header is the first section of the page template. Enter HTML that defines the <Head> section of the HTML document. Regions that display or processes and computations that execute AFTER HEADER will display or execute immediately after this section in the template is rendered. For example:

<html>
 <head>
   <title>#TITLE#</title>
   #HEAD#
 </head>

Body is the second section in the page template and is rendered after the header section, but before the footer section. Enter HTML that defines the <Body> section of the HTML document. At a minimum, you must include the #BOX_BODY# substitution string. It is recommended that you also include the #FORM_OPEN# and #FORM_CLOSE# substitution strings. For example:

   <body #ONLOAD#>
      #FORM_OPEN#
      #BOX_BODY#
      #FORM_CLOSE#
   </body>

Footer is the third section in the page template that displays after the body.


Display Points

Breadcrumb Display Point applies to generated components that use breadcrumbs and defines where the breadcrumbs are placed on the page. Sidebar Display Point applies to generated components that use Sidebars and defines where sidebars are placed on the page.

Subtemplate

Use Subtemplate to specify how a component should display. Available subtemplates include:

  • Success Message. Expands the #SUCCESS_MESSAGE# substitution string. You can define a success message either programmatically or as an attribute of a process. If a success message exists and if the page template includes the #SUCCESS_MESSAGE# substitution string, then this subtemplate is used to render the message.

  • Navigation Bar. Controls the display of navigation bar entries. Enter HTML or text to be substituted when the #NAVIGATION_BAR# substitution string is referenced in the template header, body, or footer. Use the #BAR_BODY# substitution string to identify where each navigation bar icon should display.

  • Navigation Bar Entry. Enter HTML or text that to be substituted into the navigation bar #BAR_BODY# substitution string for each navigation bar entry. Use the following substitution strings to create the navigation bar entry subtemplate.

  • Notification. Enter HTML or text to be substituted when the #NOTIFICATION_MESSAGE# substitution string is referenced in the template header, body or footer. Use the substitution string #MESSAGE# to indicate where in the Notification Message the body of the message will appear.

Standard Tab Attributes

You must populate this attribute if your application includes standard tabs. Standard tabs can be placed in the header, body, or footer sections of the page template using the #TAB_CELLS# substitution string. The page template Header/Body/Footer defines the HTML table and rows. This subtemplate defines how these tabs display by defining the specific cell. Available attributes include:

  • Current Tab. Enter HTML or text to be substituted for the currently selected standard tab. Whether or not a tab is current is determined by standard tab attributes. For example:

    <td>#TAB_LABEL#</td>
    
    
  • Non Current Standard Tab. Enter HTML or text that will be substituted for the unselected standard tabs. Use the #TAB_TEXT# substitution string to position a tab's label and link within the template. For example:

    <td><a href="#TAB_LINK#">#TAB_LABEL#</a></td>
    
    

See Also:

"Creating Tabs"

Parent Tab Attributes

You must populate this attribute if your application includes two levels of tabs. Enter HTML or text that will be substituted for the selected parent tabs. Parent tabs can be placed in the header, body, or footer section of the page template using the #PARENT_TAB_CELLS# substitution string. Parent tabs only display in conjunction with standard tabs. Available attributes include:

  • Current Parent Tab. Enter HTML or text that will be substituted for the selected parent tabs. Whether or not a tab is current is determined by the page that displays and the standard tab set the page uses. Use the #TAB_TEXT# substitution string to position a tab's label and link within the template. For example:

    <td><a href="#TAB_LINK#">#TAB_LABEL#</a></td>
    
    
  • Non Current Parent Tab. Enter HTML or text that will be substituted for the unselected parent tabs. Use the #TAB_TEXT# substitution string to position a tab's label and link within the template. For example

    <td><a href="#TAB_LINK#">#TAB_LABEL#</a></td>
    
    

See Also:

"Creating Tabs"

Image Based Tab Attributes

Use this subtemplate for tabs that are entirely based on images. Available attributes include:

  • Current Image Tab. Enter HTML to be used to indicate that an image based tab is currently selected. Include the #TAB_TEXT# substitution string to show the displayed name of the tab.

  • Non Current Image Tab. Enter the HTML to be used to indicate that an image tab is not currently selected. Include the #TAB_TEXT# substitution string to show the displayed name of the tab.

Multi Column Region Table Attribute

If the Application Express engine displays regions in multiple columns in the same region position, then Oracle Application Express will render an HTML table. This attribute enables you to control the attributes of the <table> tag.

Error Page Template Control

Use this attribute only when a page template will be designated as an error template. Use the #MESSAGE# substitution string to place the error message and the #BACK_LINK# substitution string to display a link back to the previous page. A template can be designated as an error template by editing the application attributes. For example:

#MESSAGE#

<br>

<a href="#BACK_LINK#">back</a>

Comments

Use this attribute to record developer comments.