Difference between revisions of "Add a Document Template"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
A Print Template can be added to any object, except for the built-in [[Documents]] and [[Users]] objects.
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.


To add a Print Template to a {{typenolink|}}:
;A. Get the names of variables you'll be using in the template:
#Click '''Designer > Data > Objects > {object} > Print Templates'''
#Click '''Designer > Data > Objects > {object} > Print Templates'''
#Click the '''[New Template]''' button
#Click the '''[New Template]''' button
#If the template does not already exist, create it:
#:* Create a JSP/HTML [[Page]] in the platform
#:* Turn off the ''Include Headers'' option for that page (explanation below)
#:: -or-
#:* Create an HTML page on your local system
#:: -or-
#:* Create a Word document on your local system, saved in <tt>.docx</tt> format.
#:: -or-
#:* Create an Excel spreadsheet document on your local system, saved in <tt>.pptx</tt> format.
#:: '''Note:'''
#:: The <tt>.docx</tt> and <tt>.pptx</tt> files are stored in an XML format the platform can parse and work with. The <tt>.doc</tt> and <tt>.ppt</tt> formats are binary formats that won't work.
#In the ''New Template'' page, use the [[Template Variable Tool]] to get the names of variables you can use in the template:
#In the ''New Template'' page, use the [[Template Variable Tool]] to get the names of variables you can use in the template:
#:[[File:TemplateVariableTool.jpg]]
#:[[File:TemplateVariableTool.jpg]]
#:''Note:'' Template variables work only in HTML pages. They do not work in JSP pages.<br>(In those pages, use standard JSP programming techniques to access platform information.)
#:''Note:'' Template variables work only in HTML pages. They do not work in JSP pages.<br>(In those pages, use standard JSP programming techniques to access platform information.)
#Provide the information in the Template Information section
 
;B. Create the template:
#Create a JSP/HTML [[Page]] in the platform
#* Turn off the ''Include Headers'' option for that page.<br>(Those headers contain platform-specific Javascript that interfere with template processing.)<br>&nbsp;'''-or-'''
# Create an HTML page on your local system.<br>&nbsp;'''-or-'''
# Create a Word document on your local system, saved in <tt>.docx</tt> format.<br>&nbsp;'''-or-'''
# Create an Excel spreadsheet document on your local system, saved in <tt>.pptx</tt> format.<br>&nbsp;'''-or-'''
# Add "boilerplate" text and graphics to the template,
{{Note|The <tt>.docx</tt> and <tt>.pptx</tt> files are stored in an XML format the platform can parse and work with. The <tt>.doc</tt> and <tt>.ppt</tt> formats are binary formats that won't work.}}
 
;C. Add the Print Template to an Object:
#Provide the information in the Template Information section:
#:;Template Title:The template name
#:;Template Title:The template name
#:;Description:Describe the purpose of the template or other information about it.
#:;Description:Describe the purpose of the template or other information about it.
#:;Ready to Use:The default setting for the template is Yes.
#:;Ready to Use:The default setting for the template is Yes.
#:;Type:Choose from:
#:;Type:Choose from:
#::;HTML Template File:This is an HTML file that provides the template structure. Click the '''[Browse]''' button to locate the HTML file
#::;Template File:This file that provides the template structure. Click the '''[Browse]''' button to locate the HTML, Word, or Excel file.
#::;Page:JSP Page;
#::;Page:JSP Page;
#:::*A list of platform [[Pages]] is displayed.
#:::*A list of platform [[Pages]] is displayed.
#::::(The list does not include pages that have the ''Include Headers'' option. Those headers contain platform-specific Javascript that interfere with template processing.)
#::::(The list does not include pages that have the ''Include Headers'' option.)
#:::*Choose one of the JSP files stored in the platform.  
#:::*Choose one of the JSP files stored in the platform.  
#Click '''[Save]'''
#Click '''[Save]'''

Revision as of 23:12, 16 February 2012

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
  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
    Note: Template variables work only in HTML pages. They do not work in JSP pages.
    (In those pages, use standard JSP programming techniques to access platform information.)
B. Create the template
  1. Create a JSP/HTML 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. Create an HTML page on your local system.
     -or-
  3. Create a Word document on your local system, saved in .docx format.
     -or-
  4. Create an Excel spreadsheet document on your local system, saved in .pptx format.
     -or-
  5. Add "boilerplate" text and graphics to the template,

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.

C. Add the Print Template to an Object
  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:
    Template File
    This file that provides the template structure. Click the [Browse] button to locate the HTML, Word, or Excel file.
    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]