Generating Web output

The Web context outputs one HTML web page that contains the HTML text and all the resources necessary to display it. JavaScript files are added to the <head> in the generated HTML file. They are useful to add special features such as those offered by jQuery and its plugins, or MooTools. Style sheets are also added to the <head> and are used just as they would be used in a regular web page.

Web output can be generated in two different ways: it can be attached to an Email template when generating Email output, or it can be generated using Workflow.

Web output can be generated from the Designer when a data set is available. The data can be retrieved from a database or data file, or from a Data Mapping Configuration.

If you have an open Data Mapping Configuration and open another data file, the current Data Mapping Configuration will try to retrieve data from the file or database using its own Data Model and extraction logic.

When generating output with just an open Data Mapping Configuration, the template is merged with the complete sample data file that is part of the Data Mapping Configuration. The output is not limited to the number of records shown in the Data Model pane (which is one of the settings in the DataMapper).
Before generating Web output

Before actually generating the Web output, you may want to rasterize certain elements, such as <div> elements, business graphics, or headings with a special font type. Rasterizing converts the element to a JPG or PNG image. This is very useful to support as many clients as possible. For example, when a heading uses a font type that is not a Web font, converting the heading to JPG instead would ensure that the heading looks the same in all browsers.
To rasterize an element, right-click it and select Rasterize options. For a JPG image you can set the quality of the resulting image in a percentage.

Attaching Web output to an Email template

To attach the Web context to Email output:

  1. Open a template with a Web context and an Email context.
  2. Check the output settings for both contexts; see Email output settings in the Email context and sections and Web output settings in the Web context and sections.
    When adding the Web context to an email, only the default Web section is generated and added to the email as an HTML file. To attach multiple Web sections as separate attachments, you need to create a Control Script that specifies parts; see Control Scripts and Control Script API.
  3. Load a data file or database compatible with this template. See Loading data.
  4. On the File menu, click Send Email or Send Test Email. In the dialog that appears, check the option to attach the Web context to the email. See Send Email or Send Test Email for a description of all options.

    When you send a test email, the Email To Script will not be used; instead, the email will be sent to the address that you specify in the Send Test Email dialog.

  5. Fill in the dialog and send the emails.

Generating Web output from Workflow

  1. Open a template with a Web context.
  2. Send it to Workflow using the Package Files dialog; see Sending files to Workflow.
  3. Create a process in Workflow containing at least the following steps:
    • Any input that will capture a job file that is compatible with the Data Mapping Configuration that is used. To capture incoming web requests, such as from a personalized URL (see Personalized URL), use a HTTP Server Input task (see Workflow Help: HTTP Server Input).
    • An Execute Data Mapping task to generate a valid record set (see Workflow Help: Execute DataMapping Task).
    • A Create Web Content task with the appropriate settings, to generate the HTML output (see Workflow Help: Create Web Content).

Web output settings in the Web context and sections

There are a few settings for the Web context and Web sections that have an impact on the actual web page that is generated.

These settings are:

 
  • Last Topic Update: 24/01/2017 09:32
  • Last Published: 7/6/2017 : 9:49 AM