Page Templates

Define the appearance of a page using page templates.

About Page Templates

Learn about page templates available in the Universal Theme.

Page Templates define the layout and purpose of your pages. The Universal Theme supports two types of navigation menus: side tree-based navigation and top tab-like navigation.

To view samples of all the available page templates:

  1. Run the Universal Theme Reference app.

  2. From the Main Navigation menu, select Design and then Page Templates.

See Also: Accessing the Universal Theme Reference App

Page Template Attributes

Learn about page template attributes.

A page template consists of a header template, a body template, a footer template, and several subtemplates. If you do not specify a page template as a page-level attribute, then the Oracle APEX engine uses the default page template defined on the Create/Edit Theme page.

Page templates combine static HTML with substitution strings that are replaced at runtime. 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.

This topic describes specific sections of the Edit Page Template page. To learn more about a specific attribute, such as supported substitution strings, see field-level Help.

Name

Name identifies the name of the template. 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. App Builder accomplishes this template mapping through the assignment of a template class.

Use the Translatable checkbox to indicate if this template contains text strings that require translation.

Template Type identifies the page template type. If set to Dialog Page, the template is only be available for selection by a page with a page mode of Modal or Non-Modal. If set to Normal Page, the template is only be available for selection by a page with a page mode of Normal.

See Also: Creating Dialog Pages and Required Dialog Page Template Attributes

Definition

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 (#).

Tip: For a list of supported substitution strings and to view examples, see field-level Help.

Definition attributes include:

JavaScript

Tip: For a list of supported substitution strings and to view examples, see field-level Help.

Available attributes include:

Cascading Style Sheet

File URLs

Enter Cascading Style Sheet file URLs to be loaded for this page template. Each URL has to be written into a new line. If you provide a minified version of your file you can use the substitution string #MIN# to include .min or #MIN_DIRECTORY# to include minified/ in your file URL for a regular page view and an empty string if the page is viewed in debug mode. You also have access to the substitution string #APP_VERSION# if you want to include the application’s version in the file URL.

Do not include opening or closing script tags, just include the file URL.

Inline

Enter Cascading Style Sheet code to be used for this page template. Consider putting it into an external file to avoid duplication and to leverage browser caching of static files. Code you enter here replaces the #TEMPLATE_CSS# substitution string in the template.

Do not include opening or closing style tags, just include the cascading style sheet code.

Subtemplate

Enter the HTML for subtemplates below. Subtemplates are placed inside the body of the page template using substitution strings.

Subtemplates include:

Image Based Tab Attributes

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

Layout

Specified the type of layout used for the page. The Type you select determines what attributes displays. To learn more about an attribute, see field-level Help.

From Type, select a layout:

Positions

Create positions for this page template. Positions enable you to identify where components (that is, regions, items, buttons) display on this page template. The substitution string of a position cannot be one of the reserved page substitution strings, (for example, NOTIFICATION_MESSAGE).

Navigate to the Edit Page Template, Positions tab to see a complete list of reserved substitution strings.

Dialog

Dialog attributes only appear if you select a Template Type of Dialog Page. These settings are overwritten by a similar attributes specified at page-level.

Available Dialog attributes include:

See Also: Required Dialog Page Template Attributes

Error Page Template Control

Use this attribute when a page template is designated as an error template.

Substitution Strings

Note: Template directives are supported by specific attributes of page templates. See Using Template Directives.

Substitution strings are used within templates to reference component values. To view the most current list supported substitution strings for a given template, view the template and find the Substitution Strings report.

Tip: All template substitution strings must be in uppercase letters and begin and end with a number sign (#).

Required Dialog Page Template Attributes

Learn about required dialog page template attributes.

To create a dialog page template, you must define the following Page Template attributes.

Attribute Description
Name, Template Type Must be defined as Dialog Page.
JavaScript, Dialog Initialization Code Enter JavaScript code to initialize the page as a dialog. See field-level Help for function call syntax.
JavaScript, Dialog Closure Code Enter JavaScript code to close the dialog page. See field-level Help for function call syntax.
JavaScript, Dialog Cancel Code Enter JavaScript code to cancel the dialog page. See field-level Help for function call syntax.
Dialog, Width Sets the default width for dialogs. The page template-level setting can be overwritten at page-level.
Dialog, Height Sets the default height for dialogs. The page template-level setting can be overwritten at page-level.
Dialog, Maximum Width Sets the maximum width for dialogs, in pixels. The page template-level setting can be overwritten at page-level.
Dialog, CSS Classes Enter additional CSS classes you wish to be applied to dialogs. The page template-level setting can be overwritten at page-level.
Dialog, Allow Embed in Frame Select the page mode to use this attribute to control if the browser is allowed to display your application’s pages within a frame. APEX embeds modal dialogs in iframes. If you set the application security attribute Browser Frame to Deny, checking Allow Embed In Frame for Modal Dialog will instead use Allow from same origin for dialog pages that use this template.

See Also: Creating Dialog Pages