Template scope
 
The scope of a template refers to its zone of influence, i.e. its subtree, within which by default the articles of all child and descendant nodes would be forms derived from it. We should make it clear that the presence of an alignment icon does not necessarily mean that its node falls within the template's scope. For example:
 
Fig. 1a Fig. 1b Fig. 1c
 
Node A was created as a sibling of Top (Fig. 1a). By focusing on Node A and pressing Shift+Right, Node A becomes a child of Top and a sibling of Template 1 (Fig. 1b). Even though Node A now has an alignment icon, it is still not within Template 1's scope. If you want to confirm this, focus on Node A and press Enter. The Insert new node window does not appear and a sibling blank standard article node is immediately created. Now, press Shift+Right again to make Node A a child of Template 1 and a sibling of Form 1 (Fig. 1c). Now Node A falls within Template 1's scope and focusing on Node A and pressing Enter will bring up the Insert new node window.
 
If you press Shift+Left repeatedly, this will reverse Node A's movement, and the alignment icon will disappear when it finally becomes a sibling of Top again (Fig. 1a).
 
Mixing forms
Since template scope extends only to nodes created within the template's subtree by using the Insert menu commands, you can Drag-and-drop, Move, Paste or use Insert special to add any other nodes (including nodes with forms) into the subtree without changing their articles to match the template.
 
For example, in Fig. 2a let's assume Template 1 is a Simple addressbook template, therefore Form 1 created from it is a Simple addressbook form. Focus on Template 1, select Tree ⁄ Insert special ⁄ Individual node ⁄ Business address ⁄ Insert as child, and click OK.
 
 
Fig. 2a Fig. 2b

You can see (Fig. 2b) that a Business address form has been created within Template 1's scope, which might be handy if some of the contacts in your simple address book need business addresses.
 
Mixing templates
Similarly, you can add another template to a subtree. Delete Node A and Node: Business address. Focusing on Template 1, select Tree ⁄ Insert special ⁄ TreeBook template ⁄ Business address ⁄ Insert as child, and click OK.
 
Fig. 3a Fig. 3b
 
This creates a Business address Treebook template as a child of Template 1 (Fig. 3a). Focus on the Business address Treebook template, press Insert (to create a child node), select Insert a node using the current book template, then click OK. As expected, a Business address form (Form 2) is generated (Fig. 3b).
 
Now let's see what happens when you insert a sibling from the template. Focus on the Business address Treebook template, press Enter (to make it a sibling node), select Insert a node using the current book template, then click OK.

Fig. 4

Did you expect another Business address form? Think again. Scope does not extend to siblings of the template, only its children. TreePad PLUS searched upstream for the nearest ancestor TreeBook template, which is Template 1, and based the form on that (Fig. 4).  In fact, if you focus on Template 1, press Insert,  select Insert a node using the current book template, then click OK, TreePad will bypass the Business address Treebook template and give you the same result.
 
To put it another way, Form 3 is within the scope of Template 1, but outside the scope of the Business address Treebook template.
Search ]     [ Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 283 of 563)

This page is created with TreePad