Position
The positions property of the sheetConfig object (see sheetConfig) can be used to retrieve and modify settings for sheets in different positions. Available positions are:
- single: The only sheet in a section.
 - first: The first sheet in the section.
 - middle: All after the first sheet and before the last sheet in a section.
 - last: The last sheet in a section.
 - all: All sheets in the section.
                Settings for all sheets may conflict with settings for a particular position. In such cases, the setting that was specified last overrides the other.
 
Each of these positions has the following fields.
| Field | Type | Description | 
|---|---|---|
| allowContent | AllowContent | 
                                             Used to specify on which sides of a sheet (in a certain position) content is allowed.  
  | 
                                    
| masterBack | String | Specifies the Master Page to use on the backside of sheets in this position. | 
| masterFront | String | Specifies the Master Page to use on the front of sheets in this position. | 
| media | String | Specifies the Media to use with sheets in this position. | 
To remove a Media or Master Page via script, give it the value  
Note that the value
                            null or an empty string (""); see the examples below.Note that the value
undefined cannot be used to remove a Media or Master Page. This will be fixed in the next version.Examples
This script retrieves a Print section and modifies a number of settings for all of its sheets.
let section = merge.template.contexts.PRINT.sections["Section 1"];
section.sheetConfig.positions.all.allowContent = AllowContent.ALL_SIDES;
section.sheetConfig.positions.all.media = "MyMedia";
section.sheetConfig.positions.all.masterFront = "Master page 1";
section.sheetConfig.positions.all.masterBack = null; // or an empty string
                            The following script ensures that empty backsides of single sheets are omitted.
let section = merge.template.contexts.PRINT.sections["Section 1"];
section.sheetConfig.positions.single.omitMasterOnEmptyBackside = true;