Editor-Template Technical Notes

This chapter is only for users who understand HTML and need to employ more sophisticated features than the editor provides.

I. Overview

LeadMiner templates are very closely tied to the editor and vice-versa. While templates are based on HTML, you should not think of them as independent HTML documents. They contain special tags and usages that only the LeadMiner editor will understand. Ordinary browsers will not understand these extensions.

While your templates can be viewed inside a standard browser, they may not look like they do in the LeadMiner editor.

The editor itself understands most of HTML 3.2 tags, but only implements a small subset of styles. As styles, via CSS, is the preferred method of control for most modern web pages, many of the features used in those pages are not be supported by the LeadMiner editor.

This is why the strong warning is displayed on LeadMiner's HTML Source Editor (available from the View menu).
edit-html
The following sections describes these special features and restrictions.

II. Head Tag

When editing a template via LeadMiner's HTML Source Editor, you will not see any of the tags in the <head> </head> block tag. These tags are stripped out of the template before in is loaded into the source editor and added back in if any changes have been made in the <body> </body> block.

There is never a reason to change the header block even for an expert. Nevertheless, here is an example from a "reverse mortgage" template, so you can at least understand the kinds of information they contain.

<head> <AddHead>false</AddHead> <AddFoot>false</AddFoot> <ComputeTags> Line1TermPayout#1/Line2TermPayout#1/Line3TermPayout#1/Line1TermPayout#2/Line2TermPayout#2/ Line3TermPayout#2/Line1TermPayout#3/Line2TermPayout#3/Line3TermPayout#3/TenurePayout#1/ TenurePayout#2/TenurePayout#3 </ComputeTags> <ComputeTagParams> <Line1TermPayout#1>10</Line1TermPayout#1> <Line2TermPayout#1>15</Line2TermPayout#1> <Line3TermPayout#1>25</Line3TermPayout#1> <Line1TermPayout#2>10</Line1TermPayout#2> <Line2TermPayout#2>15</Line2TermPayout#2> <Line3TermPayout#2>25</Line3TermPayout#2> <Line1TermPayout#3>10</Line1TermPayout#3> <Line2TermPayout#3>15</Line2TermPayout#3> <Line3TermPayout#3>25</Line3TermPayout#3> </ComputeTagParams> </head>

III. Body Tag

The id Attribute

The most important thing to be aware of when editing HTML source directly is to not change the id portion of any tag. For example:

<div style="height: 792" id="page">

This example refers to a letter size division of a document and most not be altered directly.
Note: In this case you should also refrain from manually changing the height attribute, as 792 refers to the number of print pixels in an 11" document - i.e. 11 x 72 = 792.

Images

Images present another important point of understanding. As you know from the basic editing descriptions in the previous chapeter, there are 2 types of images: static and dynamic placeholder. Internally however, there are actually two additional images types. All 4 types types are described beolw from an HTML prespective.

Static

The following tag is an example of a static image as it is described in a template.

<img height="107" width="160" src="file:///C:\Program Files\LeadMiner\images\1AE525123819D037.JPG">

Notice that the location of all static images (i.e. the directory) is always the same - in this case, C:\Program Files\LeadMiner\images\ (aka: the images subdirectory). Also the image name (1AE525123819D037.JPG) will not look familiar. This is because all static images, whether edited or not, are copied to the same location, so they each need a unique name so they won't conflict. This name is actually a 64-bit hash translation of the original image's complete file specification.

Dynamic Placeholder

An example of a dynamic placeholder image as it is descbibed in a template is:

<img width="170" height="170" src="file:///C:\Program Files\LeadMiner\Icons\Milhouse.1.png">

Here again, Notice that the location of all dynamic placehold's is always the same - in this case, C:\Program Files\LeadMiner\Icons\ (aka: the Icon subdirectory).

Temporary Token

This type of image only exists while the template is actually open in the editor. An example of this image tag is:

<img src="file:///C:\Program Files\LeadMiner\images\temp\p1.png" id="p1:fff12#000000:Arial" alt="Current Date">

When the editor is loading a template and sees this type of image it builds it on the spot, using the id and alt attributes to draw the image. The id contains all the font and style information needed for the token it represents. Whereas, alt contains the name of the data element which will get substituted during letter generation.

Simple Placeholder

These images exist only as page layout placeholders. When a document is generated for preview or mailing, these images will be replaced by a block of text and/or image(s). The best example is the header:

<img src="file:///C:\HRM.Source\application\client\Icons\PlaceholderHead.png" alt="header" id="placeholder">

Here, the alt attribute contains the name of the HTML file which contains the data. These files all live in the branch subdirectory within your templates subdirectory. This type of data is always inserted within a <div> block.

Miscellaneous

Paragraph Code Set

A very important issue is how the editor constructs a paragraph. All paragraphs inserted by the editor consist of a set of tags, followed by the paragraph symbol (&#182;). This symbol must be the first visible character after a new paragraph tag. It must also occur directly after a font tag for proper functioning of the editor. Paragraphs are always inserted like this:

<p style="margin-bottom: 0.0; margin-top: 0.0" align="left">
<font color="#660066" size="4" face="Verdana">&#182;

While you can directly alter the p or font tag attributes, never insert white space into any part of this code set.

Page Marker

Another special tag that should not be altered is the page marker. This is created to help you see printed page deliniation. It is never included in a printed page, but the editor expects to find it. The current syntax for this tag is:

<hr noshade="true" size="10">

IV. Summary

Now that you know about the critical restrictions and specialized tags and attributes you are ready to try some experimentation if you like. We highly recommend that you always make your modifications in LeadMiner's HTML Source Editor window, because after you save your changes there you can use the UnDo button to back out those changes.