Oracle
  Home arrow Oracle arrow Page 3 - Focusing on Templates in Oracle HTML DB
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
ORACLE

Focusing on Templates in Oracle HTML DB
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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
     

       

    ORACLE ARTICLES

    - Oracle's Turn to Play in the Sun
    - Implementing and Using Oracle`s Restore Poin...
    - 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...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek