2022.1

Table Of Contents
l On the Resources pane, expand the Contexts folder, expand the Web context, right-
click the name of the section, and then click Delete.
Warning
If you don't have a backup of the template, the only way to recover a deleted section, is to
click Undo on the Edit menu, until the deleted section is restored. After closing and
reopening the template it is no longer possible to restore the deleted context this way.
In the Saving Preferences you can set whether a backup file should be created when you
save the template; see "Save preferences" on page912.
Filling a Web page
Many of the content elements that are available for all three contexts are particularly suitable for
web pages; see "Content elements" on page664. Do not use Positioned Boxes and Tables to
position elements, however; use Inline Boxes instead.
Forms and Form elements are only available in a Web context; see "Forms" on page751 and
"Form Elements" on page755.
Using variable data on a Web page
Web templates are personalized just like any other template; see "Variable Data" on page846.
There are a few extra possibilities, though: variable data can be used in Form elements and
they can be passed to client-side JavaScript.
Using Variable Data in Form elements
Variable data may be used in form elements, such as a drop-down list (a Select element). How
to do that, is described in this how-to: Dynamically add options to a dropdown.
Passing Variable Data to client-side JavaScript
When serving Web pages using Workflow, the HTML is first personalized and then served to
the web browser by a Workflow process. At that stage custom JavaScripts do not have access
to the information stored in the Data Model. To enable a client-side script to use variable data,
you need to create a Text Script that produces a JSON string and stores that in the attribute of
an HTML element, the value attribute of a hidden field for example. The custom JavaScript can
than retrieve that information and use it to create dynamic page elements. Producing a JSON
Page 582