Creating Your Own Templates

You can create your own templates based on a database that you have designed or modified. Creating a template is a relatively simple process that involves making a copy of the design elements of a database minus the data and then modifying the copy's database properties to mark it as a template and name it. Here are the steps to take:

  1. Choose the database that you will make the template from.
  2. Choose File, Database, New Copy from the menu.
  3. Leave the server at Local for now.
  4. Change the title of the database, if necessary.
  5. Change the filename, if necessary, and change the extension to .ntf.
  6. Click Database Design Only.
  7. Click OK. See Figure 2.25.

    Figure 2.25. When creating a template, change the extension to .ntf.

    graphics/02fig25.jpg

CAUTION

When you are creating a database template, it should always be placed in the default data directory so that it can be chosen from the list of available template databases in the new database dialog box. If the template is placed in a subdirectory, it will not be available in this list.

 

You have created a design copy of the database, but it is not yet a full-fledged template. To make it a template, you have to change the database properties to give the template a name:

  1. Open the new template, and then open the Database properties box to the Design tab.
  2. Click the Database File Is a Master Template check box.
  3. Enter a name in the Template name field (see Figure 2.26).

    Figure 2.26. The Design tab of the Database properties box specifies whether the database is a template or inherits from a template.

    graphics/02fig26.jpg

  4. Close the properties box.

NOTE

Templates do not actually have to be saved with an .ntf extension, but it is good practice to do so. You can turn a database file with an .nsf extension into a template by changing the database properties using the previous steps. However, the file will not be listed in the template listing when creating a new database unless it has the .ntf extension.

 

New databases can now be created from this template and can inherit design changes if the database and template both reside on a server because refreshing the design is accomplished through the server task. If a database and its template reside on a workstation, the design can be refreshed manually by choosing File, Database, Refresh Design from the menu.

When a new database is created, the default entry in the Access Control List is set to Designer and you are set as the Manager. You can set a default ACL that is stored in the template by placing square brackets around the entries that you want to inherit to the new database. If you choose to do this, make sure that you are listed as the Manager or Designer. Using the ACL of a template, you can change the default entry and add users, servers, or groups to the ACL. To do this, create another default entry with brackets, [-Default-] , in the ACL and set the access to No Access. Follow that with whatever additional groups, servers, and users you want to add, in brackets.

Part I. Introduction to Release 6

Whats New in Release 6?

The Release 6 Object Store

The Integrated Development Environment

Part II. Foundations of Application Design

Forms Design

Advanced Form Design

Designing Views

Using Shared Resources in Domino Applications

Using the Page Designer

Creating Outlines

Adding Framesets to Domino Applications

Automating Your Application with Agents

Part III. Programming Domino Applications

Using the Formula Language

Real-World Examples Using the Formula Language

Writing LotusScript for Domino Applications

Real-World LotusScript Examples

Writing JavaScript for Domino Applications

Real-World JavaScript Examples

Writing Java for Domino Applications

Real-World Java Examples

Enhancing Domino Applications for the Web

Part IV. Advanced Design Topics

Accessing Data with XML

Accessing Data with DECS and DCRs

Security and Domino Applications

Creating Workflow Applications

Analyzing Domino Applications

Part V. Appendices

Appendix A. HTML Reference

Appendix B. Domino URL Reference



Lotus Notes and Domino 6 Development
Lotus Notes and Domino 6 Development (2nd Edition)
ISBN: 0672325020
EAN: 2147483647
Year: 2005
Pages: 288

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net