---
title: ConditionalAutoPlacement
framework: applenewsformat
role: symbol
role_heading: Object
path: applenewsformat/conditionalautoplacement
---

# ConditionalAutoPlacement

The object for defining conditional properties for an automatically placed component, and when the conditional properties are in effect.

## Declaration

```data
object ConditionalAutoPlacement
```

## Properties

conditions: An instance or array of conditions that, when met, cause the conditional automatic placement properties to take effect. enabled: A Boolean that defines whether placement of advertisements is enabled. layout: A value that defines the layout properties for the automatically inserted components.

## Mentioned in

Apple News Format Release Notes

## Discussion

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"             }           ]         }       ]     }   },   … }

## See Also

### Conditional Design Elements

- [Condition](applenewsformat/condition.md)
- [ConditionalComponent](applenewsformat/conditionalcomponent.md)
- [ConditionalComponentLayout](applenewsformat/conditionalcomponentlayout.md)
- [ConditionalSection](applenewsformat/conditionalsection.md)
- [ConditionalDocumentStyle](applenewsformat/conditionaldocumentstyle.md)
- [ConditionalText](applenewsformat/conditionaltext.md)
- [ConditionalTextStyle](applenewsformat/conditionaltextstyle.md)
- [ConditionalComponentTextStyle](applenewsformat/conditionalcomponenttextstyle.md)
- [ConditionalComponentStyle](applenewsformat/conditionalcomponentstyle.md)
- [ConditionalContainer](applenewsformat/conditionalcontainer.md)
- [ConditionalDivider](applenewsformat/conditionaldivider.md)
- [ConditionalButton](applenewsformat/conditionalbutton.md)
