Home arrow Oracle arrow Page 2 - Sub-templates and More with Oracle HTML DB

Sub-template Definitions - Oracle

In this third part of a three-part article covering Oracle HTML DB, you'll learn about sub-template definitions and more. This article is excerpted from the Oracle HTML DB Handbook, written by Lawrence Linnemeyer and Bradley Brown (McGraw-Hill, 2006; ISBN: 0072257687).

TABLE OF CONTENTS:
  1. Sub-templates and More with Oracle HTML DB
  2. Sub-template Definitions
  3. Standard Tab and Parent Tab Attributes
  4. Image-based Tab Attributes
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 4
April 12, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Some templates contain sub-templates. A sub-template is a portion of a template that is defined in the later part of the template definition page and referred to in an earlier section of the template with a substitution variable.

Success Message

This sub template will be the value for the #SUCCESS_MESSAGE# substitution variable used in the Body section. This sub-template is where you specify the HTML for formatting the content of the success message. This sub-template also uses the #SUCCESS_MESSAGE# substitution variable. This could be a little confusing because the same substitution variable is used for two different things. When it is used here, it is substituted with the actual text of a success message after a page is processed successfully; when it is used in the Body section, it is substituted with the value of this sub-template. The light bulb and “Action Processed” text seen in Figure 6-8 are the results of the following code:

<table class="std">
 
<tr>
   
<td align="right" width="24">
     
<img src="#WORKSPACE_IMAGES#wwv_light.gif>" width="24" height="23"
      
alt="success" >
   
</td>
   
<td>
     
<span style="color:#336699;font-size:10pt;text-align:left;
                   vertical-align:bottom;">
        #SUCCESS_MESSAGE#
      </span>
    </td>
  </tr>
</table>

Navigation Bar

This sub-template is the source for the value of the substitution variable #NAVIGATION_BAR# used in the Body section. This is where you format the navigation bar specified in the Shared Components section of an application. Two items—Help and Logout—were defined for the navigation bar shown in Figure 6-8. The following listing of code is used to display the example’s navigation bar. The substitution variable #BAR_BODY# is used to place the actual contents of the navigation bar. The contents of this substitution variable can be controlled even further if desired. See the upcoming “Navigation Bar Entry” section for more details.

<table>
  <tr>
   
<td>
     
<br/>
   
</td>
   
#BAR_BODY#
 
</tr>
</table>

Navigation Bar Entry

If you want extreme control of the way the items in the navigation bar are displayed, this is the section where that is accomplished. Note that it is not necessary to define this sub-template; the items in a navigation bar will display fine without any entry here. The code entered here controls the presentation of each individual navigation item placed in the navigation bar’s #BAR_BODY#. You can use eight different substitution variables in creating this sub-template. They can all be found in the help for the section by clicking on the title of the section. The following code listing uses two of the substitution variables. The first, #LINK#, will receive the actual URL link of the navigation item. The second, #TEXT#, will receive the text of the navigation item.

<a href=#LINK# style="color:#336699;font-size:10pt;text-align:left;
                      vertical-align:bottom;">
  #TEXT#
</a>

Notification

This sub-template defines the value for the #NOTIFICATION_MESSAGE# substitution variable used in the header. The only substitution variable available for this section is the #MESSAGE# variable. Include this variable in any HTML code you would like to use to format the notification message. This section is very similar to the “Success Message” section, earlier in this chapter.



 
 
>>> More Oracle Articles          >>> More By McGraw-Hill/Osborne
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ORACLE ARTICLES

- Oracle Java Security Woes Continue
- Oracle's New IaaS Cloud Option: There's a Ca...
- Oracle Acquires Eloqua to Boost Cloud Presen...
- Choosing Innovation: Oracle Survey Insights
- Oracle Fixes Privilege Escalation Bug
- Oracle`s Communications Service Availability...
- Oracle Releases Exalytics, Taleo Plans
- Oracle Releases Communications Network Integ...
- Oracle Releases Communications Data Model 11...
- Oracle Releases PeopleSoft PeopleTools 8.52
- Oracle Integrates Cloudera Apache Distro, My...
- Oracle Releases MySQL 5.5.18
- Oracle Announces NoSQL Database Availability
- Sorting Database Columns With the SELECT Sta...
- Retrieving Table Data with the LIKE Operator

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: