ConditionalAutoPlacement
The object for defining conditional properties for an automatically placed component, and when the conditional properties are in effect.
Declaration
object ConditionalAutoPlacementProperties
| Name | Type | Description |
|---|---|---|
conditions Required | (Condition | [Condition]) | An instance or array of conditions that, when met, cause the conditional automatic placement properties to take effect. |
enabled | boolean | A Boolean that defines whether placement of advertisements is enabled. |
layout | AutoPlacementLayout | A value that defines the layout properties for the automatically inserted components. |
Mentioned in
Discussion
Use the ConditionalAutoPlacement object to define an array of conditional automatic placement properties and the conditions under which to apply them. When a condition is met, the value of a property in ConditionalAutoPlacement overrides the value of the same property if defined in the parent AdvertisementAutoPlacement object. See AdvertisementAutoPlacement.
Example
{
"version": "1.9",
"identifier": "SampleArticle",
"language": "en",
"title": "Apple News",
"layout": {
"columns": 7,
"width": 1024,
"margin": 75,
"gutter": 20
},
"autoplacement": {
"advertisement": {
"enabled": true,
"bannerType": "any",
"distanceFromMedia": "50vh",
"frequency": 10,
"layout": {
"margin": 10
},
"conditional": [
{
"enabled": false,
"conditions": [
{
"verticalSizeClass": "compact"
}
]
}
]
}
},
…
}