Home arrow Oracle arrow Page 4 - Working with Themes and Templates

Editing an Existing Template - Oracle

Most experienced programmers understand the advantages of separating the look and feel of an application from the application's logic. Oracle uses HTML DB to accomplish this. This article introduces you to the themes and templates that HTML DB provides. It is excerpted from chapter 6 of the Oracle HTML DB Handbook, written by Lawrence Linnemeyer and Bradley Brown (McGraw-Hill, 2006; ISBN: 0072257687).

  1. Working with Themes and Templates
  2. Switching an Application’s Theme
  3. Templates
  4. Editing an Existing Template
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 3
March 29, 2007

print this article



To edit any existing template, simply click on the template name from the Templates page. This will take you to a type-specific template edit page. In order to edit templates, you need at least a good working knowledge of HTML. See the following sections for specifics on Page and Report templates. Due to space limitation, we are not able go into complete detail on all nine different types of templates. However, you will come to find that they are very similar when it comes to editing them. With a good working knowledge of HTML, an understanding of the substitution variables, and some hands-on experimentation, you should be able to fully understand each type of template. 

Figure 6-4.  Templates page

Creating and Copying Templates

Like themes, templates can either be created from scratch or copied from another location. With templates, you don’t copy from the HTML DB repository, but rather from other templates in other themes, including themes from other applications. Like with themes, template creation is accomplished through a multiscreen wizard. The first screen allows you to select the type of template you are going to create. On the next screen you choose to create the template either from scratch or as a copy of an existing template.

If you choose to create the template from scratch, you will be asked to name the template, select the theme it will belong to, and specify the template class. Upon confirmation, a nearly blank template will be created; it will include some very basic HTML along with the minimal substitution variables.

If you go the route of creating a template as a copy of an existing template, you select the application to copy from and then select the theme to copy from and the theme to copy to. At this point, the wizard will present to you a list of templates from the selected theme that are of the type you chose to copy, as shown in Figure 6-5. For each of the templates listed, you can choose to copy and subscribe, just copy, or not copy. If you subscribe to a template and changes are later made to the master template, you can update the subscribed template by entering the edit template page and clicking on the Refresh Template button found in the Template Subscription section of the edit template page. Be aware that any changes you make to the subscribing template will be lost when you refresh the template.

Figure 6-5.  Creating templates by copying

Figure 6-6.  Replacing templates

There is one other powerful feature available for copying templates. If you have copied templates from another application but did not subscribe when you copied, you can still refresh the template from the original. Actually, you can replace any utilized template in your current application with another template in another application. In the Tasks box on the right side of the Templates page is an option titled “Replace templates in this application with templates from another application.” If you follow this link, you will be asked to select the source application from which you would like to replace templates. You will then be presented with a list of the templates for your current application that are currently being utilized. For each of these templates, you can choose a replacement and select whether to replace or to replace and subscribe, as shown in Figure 6-6.

Please check back next week for the continuation of this article.

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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- 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: