Sunday, September 16, 2012

Creating Templates in DEVONthink Pro Office

A brief how-to create plain and (particularly) smart templates in DEVONthink Pro Office (DTPO).  To read about DTPO as an ELN in a academic research in engineering visit here.

[Step One]  Existing DTPO template files

Template files in DEVONthink Pro Office (DTPO) are buried in the inner workings of the program... but only so that the menu giving access to templates can be updated live!
The "New from Template" menu can be updated live, via the "Update Template Menu" option, if new templates are created in default template folder.
Existing templates are located in:
  ~/Library/Application\ Support/DEVONthink\ Pro\ 2/Templates.noindex/

Note the folders in this directory corresponding to the folders on the "New from Template" menu.  Templates created in this directory will also appear in this menu, once you click "Update Template Menu".

There are three kinds of templates:  document prototypes, "plain" templates which create a file with default text and formatting (.dtTemplate files), and "smart" templates which execute commands in DTPO upon creation (.templatescriptd files).
Templates should live in the DTPO "Templates.noindex" folder
One of the best ways to create a new template (.dtTemplate and .templatescriptd files) is to copy and edit existing ones.  Make sure to place your own templates (no matter the type) in the proper folder in the Templates.noindex directory, as that placement determines where your templates appear in the DTPO "New from Template" menu.

[Step Two] Creating new (static) document prototypes 

The heart of all three template types is a a document prototype.  This is just a file of the base file type for the template you are creating.  That is, to create an MS Excel .xlsx template, just create a new Excel spreadsheet and save it (as a .xlsx) into the Template.noindex folder, or whichever sub-folder you want.  When selecting this template in DTPO, a file that is an exact copy of your prototype file will be created with a default filename.

This hints at the flexibility of this file creation method... because you can put whatever you want into your document prototype.  For example, if you want to create RTF journal entries with a fixed header and/or formatting, then simply put that into your prototype, and every document created from that template will have the same formatting/default text.

As an example, download this RTF file and save it to your Templates.noindex file...  Then go on to [Step Three].

For more complex template capabilities, including those that contain dynamic text, don't go directly to [Step Three]... instead, first skip to [Step Two B], below, then go to [Step Three]!

[Step Three] Update your "New from Template" menu

To use your newly created template

No comments:

Post a Comment