Configure Lazy Loading Options

Lazy loading allows template designers to choose to omit parts of a page depending on the size of the browser window. When editing page templates in Content Studio, areas, groups and widgets offer a set of options to control this functionality:

graphics/lazy_loading.png

For usage details, see Lazy Loading, in the Widget Framework User Guide.

In order to include the lazy loading configuration options in your own groups and areas, you must include the following code fragment in the group/area definitions in your layout-group resource.

<area name="main">
  <ui:label>Main</ui:label>
  <ct:options scope="current">
    ...
    <ct:field type="enumeration" name="loadingPolicy">
      <ui:label>Lazy loading</ui:label>
      <ct:enumeration value="onPage">
        <ui:label>Disabled</ui:label>
      </ct:enumeration>
      <ct:enumeration value="lazy">
        <ui:label>Enabled</ui:label>
      </ct:enumeration>
      <ui:value-if-unset>onPage</ui:value-if-unset>
    </ct:field>
    <ct:field type="enumeration" name="skipLoadingOn" multiple="true">
      <ui:label>Skip on device</ui:label>
      <ct:enumeration value="large">
        <ui:label>Large</ui:label>
      </ct:enumeration>
      <ct:enumeration value="medium">
        <ui:label>Medium</ui:label>
      </ct:enumeration>
      <ct:enumeration value="small">
        <ui:label>Small</ui:label>
      </ct:enumeration>
    </ct:field>
    <ct:field name="fragmentToken" type="basic" mime-type="text/plain">
      <ui:label>Fragment Token</ui:label>
      <ui:hidden/>
    </ct:field>
  </ct:options>
  ...
</area>