Oracle
  Home arrow Oracle arrow Page 3 - Focusing on Templates in Oracle HTML D...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Focusing on Templates in Oracle HTML DB
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2007-04-05

    Table of Contents:
  • Focusing on Templates in Oracle HTML DB
  • Common Template Sections
  • Header/Body/Footer Definitions
  • Body Section

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Focusing on Templates in Oracle HTML DB - Header/Body/Footer Definitions
    (Page 3 of 4 )

    The next section contains the definitions for the header, the body, and the footer of the page. Remember, the HTML DB engine generates each page at run time by combining the static HTML defined in your template with the dynamic pieces derived from the metadata you used when building the pages. This connection is made through the use of substitution variables. There is an area for entering the HTML for the Header section, the Body section, and the Footer section. Let’s take a closer look at an example of each of these definitions.

    Header

    The Header section contains the HTML for the HEAD section of an HTML document. Everything you would normally include before the BODY tag in an HTML document belongs here. Someone familiar with web page layout and HTML should make the modifications to templates. However, if you must do it and are not familiar with HTML, then try HTML & XHTML: The Complete Reference by Thomas Powell (McGraw-Hill/Osborne, 2003).

    The following is a listing of code from the header definition:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
       
    <title>#TITLE#</title>
       
    #HEAD#
       
    <link rel="stylesheet" href="#IMAGE_PREFIX#css/einstein.css"
         
    type="text/css" />
        <script src="#IMAGE_PREFIX#javascript/functions.js"
               type="text/javascript"></script>
    </head>

    Notice the example contains normal HTML items such as the title tag and includes statements for a Cascading Style Sheet and a file containing JavaScript. It also contains several substitution variables.

    The substitution variable #TITLE# will be replaced at run time with the value from the Title field in the Primary Page Attributes section of the Edit page, or “Form on CONTACTS,” as shown in Figure 6-7. The substitution variable #HEAD# will be replaced with the value entered in the HTML Header section of the Edit page, as shown in Figure 6-7. You might have HTML to reference additional JavaScript libraries or Cascading Style Sheets.

    The other substitution variable seen in this code block is #IMAGE_PREFIX#. This is a predefined variable that contains the directory on the server for the images that come with HTML DB. If you look at the source of a generated page, you will see that it resolves to /i/, which is mapped to ORACLE_HOME\marvel\images. The Cascading Style Sheet (CSS) file is located in ORACLE_HOME\ marvel\images\css, and the JavaScript file is located in ORACLE_HOME\marvel\images\ javascript. At a minimum, the Header section should contain the #TITLE# and the


    Figure 6-7.  Edit page--source for substitution variables

    #HEAD# substitution variables. Here’s a list of the other substitution variables allowed in the Header section:

    #ONLOAD#

    #NAVIGATION_BAR#

    #FORM_OPEN#

    #NOTIFICATION_MESSAGE#

    #SUCCESS_MESSAGE#

    #GLOBAL_NOTIFICATION#

    More Oracle Articles
    More By McGraw-Hill/Osborne


       · This article is an excerpt from the book "Oracle HTML DB Handbook," published by...
     

    Buy this book now. This article is excerpted from the Oracle HTML DB Handbook, written by Lawrence Linnemeyer and Bradley Brown (McGraw-Hill, 2006; ISBN: 0072257687). Check it out today at your favorite bookstore. Buy this book now.

       

    ORACLE ARTICLES

    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway