2018.1

Table Of Contents
Media 1 will have been replaced with the name of the media selected for the chosen
sheet position.
The field Selector in the Script Wizard contains the name of the section and the sheet
position that you have chosen.
4. Change the script so that on a certain condition, another media will be selected for the
content. For instance:
if(record.fields.GENDER === 'M') {
results.attr("content","Media 2");
}
This script changes the media to Media 2 for male customers.
See "Writing your own scripts" on page689 if you are not familiar with how scripts are
written.
5.
Click Apply, open the tab Preview and browse through the records to see if the script
functions as expected.
6.
When you click OK, the script will be added to the Scripts pane.
Rotating the Media in a Print section
The actual orientation of the Media and that of a section to which the Media is applied may not
match.
The Media can therefore be rotated per Print section:
l
On the Resources pane, expand the Print context; right-click the Print section, and click
Sheet configuration.
l
Click one of the options next to Media rotation.
The Media (to be more accurate: the Virtual Stationery images specified for this Media) will be
rotated accordingly in the entire section.
Note
l Any Virtual Stationery settings made for the Media also influence how the Media is
displayed in each section (see "Setting Media properties" on page409).
l Section backgrounds are rotated separately (see "Using a PDF file as background
image" on page393).
Page 413