Standard article templates
 
As we saw in Article templates and forms in Template types, standard articles may be used to create templates and indeed offer certain advantages over TreeBook templates. Here again is a typical standard article form⁄template enclosed in a table, which improves its appearance but is not required. Note that we have included a hyperlink, something TreeBook forms are currently unable to do1.
 
Address template
  First name:   Last name:
  Address:    
  Remarks:

Return to index
   
 
Fig. 1  Article form
 
As you can see, a master copy of it can be stored and copied to create blank forms (records). Thus standard article forms and templates are interchangeable. (TreeBook templates, on the other hand, are protected from being used as forms by being covered by a RTF article which is displayed in the Article pane.)
 
Up till now, the only way of using a standard article form as a template has been to Copy it to the TreePad Clipboard, leaving it there and pasting it in whenever needed. Unfortunately the TreePad Clipboard can only hold one item at a time, and if you use it for templates it is unavailable to hold other nodes or subtrees. Quite possibly you may have prepared two or more standard article templates for a particularly important file.
 
There is no reason why you cannot use the \templates subfolder to store your own standard article templates in addition to the others. This allows TreePad to display them in the Insert special window where you can select the one you need.
 
The Is template ⁄ Is TreeBook checkbox
If you open the Node properties window of a standard article you will notice on the General tab a checkbox titled Is template, which by default is unchecked. Placing a tick in this box gives a standard article form⁄template the power of a TreeBook template in that new nodes created within its scope will be copied from it. It makes sense to check this box in each standard article template you create, unless you wish to hide the template icon or copy⁄paste it to⁄from the TreePad Clipboard.
 
Unlike TreeBook templates and forms, you can control whether this box is checked or not. In TreeBook templates and forms derived from them, the name of this checkbox changes to Is TreeBook and the box is disabled. If the node is a TreeBook template, it is checked (since it can only be a template). If the node is a form derived from a TreeBook template, it is unchecked (since it can only be a form).
 
Let's put this feature into practice by creating a simple standard article form⁄template containing only two fields, Name: and Address:. Give its node the title name ADDRESSES (Fig. 1a).
 
 
Fig. 1a Fig. 1b
 
Now check the Is template checkbox, and your standard article form⁄template becomes endowed with the power of a TreeBook template, complete with icon (Fig. 1b)!
 
Fig. 2a Fig. 2b
 
Focusing on it and pressing Insert offers you the choice of creating a new standard article form (Fig. 2a) or a blank standard article (Fig. 2b - note that the Article pane is quite blank). At any time you can demote ADDRESSES by unticking the Is template box, and the template icon will no longer appear.
 
Although a standard article form⁄template is somewhat more vulnerable by not having a protective RTF cover article in the manner of a TreeBook template, this does actually give it the unique advantage that you can edit this template "on the fly". For example, if you suddenly had to use this template to store the details of a number of doctors, you could add the salutation "Dr." after "Name:", so all forms derived from this template would also carry the salutation "Dr.". When finished with this task, you could delete it.
 
Let's copy this template to the \templates folder and use it to create forms, templates and structures in our file. The only portal available is the TreePad structure, since .hjt templates are indistinguishable from .hjt structures to TreePad and Individual nodes and TreeBook templates recognize only .tpt files. Delete any child nodes, make sure the Is template checkbox is unchecked and then use Export ⁄ Selected subtree to export the bare ADDRESSES node to \templates with a filename such as AddrForm.hjt. Note that if template title is to contain spaces, these must be represented as underscores in the file name, e.g., for a template to be displayed as My addresses, it should be stored in \templates as My_addresses.hjt.
 
Now, select Insert special ⁄ TreePad structure ⁄ AddrForm ⁄ Insert as child2 and click OK to insert a standard article form into your file. It should look exactly like Fig. 1a.
 
This may satisfy all your requirements, but if you want to go further and insert standard article templates and structures, no problem. This time, check the Is template checkbox and save a copy of this node to \templates under the name AddrTplt.hjt. Click Insert special ⁄ TreePad structure ⁄ AddrTplt ⁄ Insert as child2 and the only difference should be the added power of a template and the template icon, as in Fig. 1b.
 
Why not add a few categories and some data records if you wish, save the whole subtree in \templates as AddrStruc.hjt and insert it, this time as a TreePad structure? It's that easy.
 
Remember that if your file already contains an embedded standard article template, you can use the Insert or Enter keys to derive subsequent child or sibling forms from it as well as using the Insert special menu. Keyboard and other forms shortcuts are discussed below.
 

 
Notes:
  1. See also the hint Insert hyperlinks into standard article templates in Hyperlink hints and tips.
  2. Again, users of TreePad PLUS and SAFE should press Alt+Insert to display this menu.
Search ]     [ Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 286 of 563)

This page is created with TreePad