Art of the Template

A template is a framework for text you intend to screen, print, or mail that often has old content already in place. You add fresh content and the finished "temple" is on the landscape.

You can make templates from documents you find yourself creating frequently, often using virtually the same framework and some duplicated content. Just strip out what is usually fresh and make a note where new material goes, perhaps with a sample that's "boxed" to stand out. Then, save the file into PocketPad's directory with the extension tpt.

When you click on "File/Template..." you will have a File Open dialog with the .tpt files listed for opening. When you open a template this way, you cannot save it back to the original file. This protects the original from the forgetful. When you save, you will get the Save As dialog.

I include only three templates. My idea is to show you what a template looks like. You can then make your own. Explain.tpt was the existing documentation when I first put up the "technology" in a replacement 1.6 that didn't have this file or the Help topic. It's still a good bet as the first one to look at. There's useful information in it. It's in the form of a brief eletter. And there is a brief eletter template named qwk_eletr.tpt. There's also another eletter related template, eltr_ndx.tpt.

By "brief" I don't mean short eletters or memos. I'm referring to the HTML framework, because the eletter is in an HTML framework. That's why the "e" is tacked on the front end. You probably know from other files in this set of documenting HTML files that, in bringing PocketPad into the current era, I've conceptualized HTML tagging as punctuation marks for a writer rather than as typographers' marks for page designers. And I've conceptualized the "duplex" e-typewriter as a text editor for the writing and a (web) browser for reading and printing.

So, ...the HTML framework is part of the punctuating of a (very inclusive) text. The "brief framework" of an eletter is three lines. And, if you're familiar with basic HTML, you'll see that the first line opens the HTML "document" and skips the HEAD section to start the BODY section. The last line closes the open blocks. The second line, under the first, is a comment (it won't show in a browser) telling the reader (in the mailer) to save the email message in an .htm file and bring it up in a browser.

In a way, the .tpt goes against the spirit of tagging as punctuating. If you play with typing HTML'd text in PocketPad, you know that you build your framework as you go. You can even do it with keys, using the "formatting pad." That's Ctrl+NumPad#. Beyond that, if you read bplates.htm, you'll see some sample sets of boilerplate items. And both of the sample sets I sketch there are HTML items not on the menus or hot keys. And three of them (in one set, HTML Extras) are the three lines for the brief eletter. But, ...a template is okay, too.

Why the eltr_ndx.tpt? Well, the great thing about eletters is that they can contain all the embedded pieces that any .htm file can link in and all the sorts of links. So, it makes sense to "collect" a group of letters (a corresondence) in a directory or directory tree and, then, to have an "index" from which you can even call up the letters. This .tpt is a template for such an index. It uses forms and javascript to allow push button access.

Here, take a look at it by clicking here . This is a template and the modeled links for the buttons aren't truly files or urls, so you'll get "Can't find" error boxes when you press them. The sample text is the documentation.

This way of archiving these new eletters or cyberletters is also a way to make "books" such as manuals or Help publications. Delphi's, and some other, programmers no longer think of a "database" as a file. Rather, it is a directory or folder. Then, tables and other files involved in the database and its maintenance are in that directory or subdirectories. In short, a database is not so much a thing as a place. And books, archives, and other compendia will be "places" as well. And, in this cyberworld, there are "wormholes" leading into other, far spaces for some content. It's an exciting conceptualizing we're just beginning to dream.

Gene Fowler
August, 1997