Web Context

In the Designer the Web context is the folder that contains Web page templates.

Creating the Web context

You can start creating a Web template with a Wizard (see Creating a Web template with a Wizard), or add the Web context to an existing template (see Adding a context).

When a Web template is created the following happens:

  • The Web context is created and one Web page or section is added to it. You can see this on the Resources pane: expand the Contexts folder, and then expand the Web folder.
    See Web pages to learn how to fill a web page template in the Designer.
    Although only one web page can be generated per record when generating Web output, the Web context can contain multiple sections. One section is created at the start, but you can add more; see Adding a Web page and Importing a Web page.

  • A style sheet, named context_web_styles.css, is added to the template. If a Template Wizard was used to create the template, Foundation style sheets are added as well. Style sheets are located in the folder Stylesheets on the Resources pane. These style sheets are meant to be used for styles that are only applied to elements in the Web context; see Styling and formatting.

Generating Web output

When the template is ready, you can:

  • Output the web page as an as an integral HTML file attached to an Email context in the same template.

  • Output the Web context in an automated Workflow using the Create Web Content task (see Workflow Help: Create Web Content).

See Generating Web output.

Includes

The Web context outputs one HTML web page. In addition to the HTML text it contains either the resources or references to the resources necessary to display it.
JavaScript files are added to the <head> in the generated HTML file. JavaScript toolboxes like jQuery and its plugins, or MooTools, are useful when you want to implement special features in the web page. (See Using JavaScript)
Style sheets are also added to the <head> and are used just as they would be used in a regular web page. (Also see: Styling templates with CSS files)

Which style sheets and JavaScript files are included, and in which order, can be decided for the Web context as a whole, as well as per Web section.

To make this setting for the Web context as a whole, right-click the context on the Resources pane and select Includes. Alternatively, select Context > Includes on the main menu. (Note that this option is only available when editing a Web section in the Workspace.) For further explanation see: Includes dialog.
To make this setting for a particular Web section, right-click the section on the Resources pane and select Includes.