"Templates" tab

The Templates tab is for templates , which greatly simplifies and speeds up the process of creating documents in Spider. You can also create and use templates using this tab

You can enable the Templates tab using the panel on the left, as well as from the menu under the button shown above or from the Main menu / View .

Contents - Menu and templates tree

Templates are grouped into categories in the form of a tree. The toolbar in the upper part of the tab is used to perform operations on the tree:

Addition of template categories
Click to add a new category (folder in the tree) of templates.

Adding a new template
Click to create a new template in the currently selected category. Use the Template Editor to create and make changes to templates.

Delete the selected template or category.
Click if you want to delete a template or category. After clicking, you will be asked for confirmation. If a template or category has been deleted accidentally, it is possible to restore it from the Windows "recycle bin".

Modification of the selected template or category name
If a template is selected, a click will open the 'Template Editor' window.
If a category is selected, a click will open the category name modification window.

Inserting a template
Click to use a template. When you click on the arrow next to the button, four options will be available:

  • Insert template at cursor position
    Click if you want to insert the template at the cursor position in the editor.

    If some text has been selected in the editor, it can be replaced with the middle part of the template (if it was defined in the template)

  • Insert template without centre
    Click if you want to insert the template where the cursor was placed in the Create tab.

    The middle part of the template will not be used. If any text has been selected in the editor window, it will remain intact. The left and right parts of the template will span the selected text.

    This option is most often used to mark the selected text with a tag along with the attributes prepared in a template.

  • Insert the template with the left part into HEAD
    Click if you want to insert a template, the left part of which will be placed in the HEAD section of the HTML document. If the current document does not have a HEAD section, one will be created.

    If any text has been selected in the editor window, it will remain intact. The middle and right parts of the template will span the selected text.

  • Create a new document
    Click if you want to create a new document from a template. A pop-up will appear asking for the name of the destination file and where it should be saved. The name of the new document will be suggested based on the name of the template from which the document is to be created.

    If there are links to pictures and other documents in the template, they will be copied to the indicated place.

    The new document will automatically open for editing in the editor window.

    Unless otherwise defined in the Program Settings, this is the default option for templates of type 'Document Template'.

Setting the template as the default template
Allows you to set the indicated template as the default template for a new document. This template can be called up using a keyboard shortcut (standard Ctrl+Shift+N), or from the File / New Document menu.

Importing macro tags from Spider 2000
Click if you want to import macro tags the old Spider 2000 (if it was installed on your system).

Enabling or disabling automatic preview of templates
Click if you want to enable or disable the template preview window.

Open the templates folder in Windows Explorer
Click if you want to display the contents of the templates folder in the Windows Explorer window.

Help for the Templates tab
Displays this Help topic.

You can move templates between categories by dragging. To copy a template to another category without removing it from the original category, hold down the CTRL key while dragging.

Templates preview

The preview window is used to familiarize yourself with the content of the template. You can follow the changes that occur as a result of editing variables and turning blocks on / off.

There are two preview windows:

  • Small preview window - at the bottom of the Templates tab.
    A small preview is enabled using the icon in the toolbar at the top of the Templates tab.

  • Large preview window - in the Browse window.
    A large preview can be enabled if a small preview pane is not enough.

  • To enable / disable large preview, you must first turn on small preview (see above). There is a " Enlarge Preview " (small magnifying glass) icon on the small preview pane. After turning on large preview, small preview may be turned off.

Choice of browser used
Click to select the browser used for browsing on this tab. As long as it is installed on your system(read more about this), you can use the browser:

  • MS Internet Explorer
  • Mozilla

Display template source
Click to see in the template preview the code it will generate, rather than the result as displayed by the document viewer. This option is available when the small preview is enabled (see above).

Below the preview pane there is a status bar with the name of the template and its type.

Variables and Blocks

Variables
Variables in templates are used to set the parameters that will be used when using the template.

If any variables are defined in the template, a button appears at the bottom of the Templates tab to display the variable inspector. Here you can change the default values to your own. Return to the list of templates after clicking on the "Templates" button (on the left). The changes made do not affect the template content and are valid until you switch to another template.

Blocks
Blocks in a template are separate sections of the template that may (but do not have to) be inserted. They allow maximum customisation of the generated code. They are used especially in complex templates, such as document templates etc.

If any blocks are defined in the template, a button appears at the bottom of the Templates tab to display the Block inspector. You can turn blocks on and off, which results in their inclusion (or not) in the generated code. Return to the list of templates after clicking on the "Templates" button (on the left). The changes made do not affect the template content and are valid until you switch to another template.

Using keyboard shortcuts

Default template hotkey
It is possible to select one default template as the template for a new document. To do this, select the selected template in the tree, and then click the Set the template as the default template button.

This template can be called with a keyboard shortcut (by default Ctrl + Shift + N).

Use of keyboard shortcuts for other templates
You can assign keyboard shortcuts to the most frequently used templates. Due to the large number of templates and the limited number of possible shortcut combinations, a two-step combination has been introduced:

  • Ctrl + J followed by the template shortcut

After pressing Ctrl + J , for the period defined in Template Settings , in the Templates tab (default 3 seconds), Spider deactivates all the program's hotkeys and enables template hotkeys. After the set time has elapsed or you clicked in the editor, the shortcuts assigned to the templates are deactivated and the general shortcuts work again in the program.

The shortcut assigned to a given template can be seen in the template description field (under the small preview window) at the bottom of the Templates tab.

Assigning keyboard shortcuts to templates
To assign a keyboard shortcut to a template, use the Template Editor. To do this, select the template you wish to edit in the tree and click on the "Modify selected template or category" button (in the menu above the template tree), or press F2.

Related topics

To top