AgileApps Support Wiki Pre Release

Add a Document Template

From AgileApps Support Wiki
Revision as of 23:30, 16 February 2012 by imported>Aeric

A Print Template can be added to any object, except for the built-in Documents and Users objects. It can use a Page stored in the platform, or it can be creating using an external HTML, Word, or Excel file. This section outlines the process.

A. Get the names of variables you'll be using in the template

Template variables can be used in HTML, Word, and Excel files. (In Pages stored in the platform, you use standard JSP programming techniques to access platform information, rather than template variables.)

  1. Click Designer > Data > Objects > {object} > Print Templates
  2. Click the [New Template] button
  3. In the New Template page, use the Template Variable Tool to get the names of variables you can use in the template:
    TemplateVariableTool.jpg
B. Create an initial template

If it does not already exist, create a blank template:

  1. Create a Page in the platform.
    Turn off the Include Headers option for that page.
    (Those headers contain platform-specific Javascript that interfere with template processing.)
     -or-
  2. On your local system, create an HTML page, a Word document saved in .docx format,
    or an Excel spreadsheet document saved in .pptx format.

Notepad.png

Note: The .docx and .pptx files are stored in an XML format the platform can parse and work with. The .doc and .ppt formats are binary formats that won't work.

3. Add "boilerplate" (fixed) text and graphics to the template.
4. Follow the instructions in Print Templates#Edit a Print Template to add variable text and images.
C. Add the Print Template to an Object

Continuing from where you left off in the [New Template] process:

  1. Provide the information in the Template Information section:
    Template Title
    The template name
    Description
    Describe the purpose of the template or other information about it.
    Ready to Use
    The default setting for the template is Yes.
    Type
    Choose from:
    HTML
    To upload an HTML, Word, or Excel file to use as a template.
    • The [Browse] button appears.
    • Click it to locate the file to upload.
    Page
    JSP Page;
    • A list of platform Pages is displayed.
    (The list does not include pages that have the Include Headers option.)
    • Choose one of the JSP files stored in the platform.
  2. Click [Save]