Add an Item Template to a View
Top  Previous  Next

When you create an item, Zoot can base the new item on a template you set up in advance. This lets you create new items with predetermined characteristics. For instance, a new item might inherit a boilerplate copyright statement.

In addition to boilerplate text, new items can inherit property values from a template, like High Priority, as well as delimited fields. To see an example of a template in action, create a new item in the New Contacts folder of the Contacts database and notice that your new contact item inherits various delimited fields, which allow you to enter name, address, telephone and other information about the new contact.

An item template must be associated with a view in your database. Once a template is associated with a view, an item created in a folder employing that view will be based on the template. For instance, if you associate a template with your database's Default View, an item created in any folder which uses the Default View will be based on that item template.


Create an Item Template
An item template is simply a standard Zoot item with its <Template> property set to Yes.


To create a template item, follow these steps:

1. Locate the Templates folder in your database. This folder is typically located toward the bottom of your Folder Tree, under the System folder. If your database does not have a Templates folder, create one.  
 
2. Create an item in the templates folder and design it as you wish. You can set property values, add boilerplate text and/or delimited fields.  
 
3. Right-click on the item and choose Properties from the pop-up menu. Zoot displays the Item Properties Dialog. Locate the <Template> property and click in the Value column once to set the property to Yes.  

Click OK when your finished. Your item template is ready. Note that you can continue to modify the item template properties whenever you wish. The next step is to associate the item template with the appropriate view in your database.


Associate an Item Template with a View
To associate an Item Template with a view, follow these steps:

1. Open a folder which employs the view you want to work with. Typically this is the folder in which you create new items in your database. In the Contacts database, for instance, the New Contacts folder would be the obvious choice.  
 
2. Click the Smart button and choose Display from the pop-up menu. Zoot opens the Display Properties Dialog. Where it says Item template associated with this view click the Select button and Zoot displays a list of all templates in your database. Select the template you want.  
 
3. Click OK to exit the Display Properties Dialog. Note that the [view description] located in the top right corner of your screen now has a † symbol next to it to indicate that a template has been associated with the view.  

Now create a new item and note that it inherits the template properties.


Notes:

·To disassociate a template from a view, click the Smart button and choose Display from the pop-up menu. In the Display Properties box, place your cursor in the box where the item template is shown and press the Delete key.  
 
·When you create an item by clicking the New button on the toolbar or by using the Zooter | New command, Zoot creates the new item in the first typed folder in your Folder Tree. For instance, if you create a new Contact item, Zoot looks for the first Contact type folder in your Folder Tree and creates your item there. If you want these items to be based on a template, make sure this first typed folder in the Folder Tree is based on a view that uses that template.