HomeOracle Focusing on Templates in Oracle HTML DB
Focusing on Templates in Oracle HTML DB
In this second part of a three-part article covering Oracle HTML DB, you'll learn about common template sections and more. This article is excerpted from the Oracle HTML DB Handbook, written by Lawrence Linnemeyer and Bradley Brown (McGraw-Hill, 2006; ISBN: 0072257687).
HTML DB utilizes four different syntaxes for accessing different types of variables throughout the HTML DB application. The following table shows the different syntaxes.
For system-defined substitution variables such as those used in templates.
For global application variables, session variables, and page items (note the trailing period)
For use in PL/SQL for character-type variables, including session variables and page items
For use in PL/SQL for number-type variables, including session variables and page items.
Bind variable syntax also used in PL/SQL to refer to global application variables, session variables, and page items.
Substitution variables are used in template definitions as placeholders for values that will be filled when the page is generated. HTML DB has a large number of predefined substitution variables that are used in template definitions. Those used in template definitions always start and end with the pound symbol (#). For example, #TITLE# is the substitution variable that will be replaced with the page title that is defined when a page is created. Each type of template has a number of substitution variables predefined for use with the template. The best way to know what variables are available for a particular section of a template and which ones are required for that section is to click on the section title to access the help text for that section.
Utilize HTML DB’s extensive built-in context-sensitive help, available by clicking on most item’s labels.
A complete list and description of each of the substitution variables available for each type of template can be found in HTML DB’s online help, accessible from the Help icon located in the upper-right corner of each page. Once you open Help to the contents page, select the Customizing Templates link under the Controlling Page Layout and User Interface section. Near the top of the page is a list of links that will take you to a section for each of the different types of templates. Each section lists the substitution variables and a brief description of the template’s major sections.
In this section, we will look at the details in a Page template to see how the template works with substitution variables and where those substitution variables tie back to what was specified when the pages were created.
The Edit Page Template screen contains 12 sections. Several of these sections are common to all or most of the other template-editing pages. We will address those sections before moving on to the page-specific ones. Navigate to an edit template screen by clicking on the name of the template from the list on the Templates page, as shown earlier in Figure 6-4.