---
title: "SitecoreAI layout data for fields"
slug: "sitecoreai-layout-data-for-fields"
abstract: "Fetched layout data for SitecoreAI fields contains field values and field metadata to support rendering and editing those fields, respectively."
---
# SitecoreAI layout data for fields

The layout data supplied to SitecoreAI fields must support two use cases: rendering the fields and editing them in SitecoreAI visual editors. To enable both use cases, this data includes raw field values for rendering content and metadata for use in editors.

```json
fields: {
  [fieldName]: {
    value: '',
    metadata: {
      // ...
    }
  }
}
```

## Field values

The `value` of a field object contains the raw, unrendered value of a field stored in SitecoreAI. For most field types, this is a string. However, for `Image` and `Link` fields, `value` is an object containing more complex data. For example, the `value` of an `Image` field includes the image-specific attributes `src`, `alt`, `width`, and `height`.

## Field metadata

When a page is rendered in an SitecoreAI editor, the rendered result must include additional markup containing metadata. This metadata is essential to enable the WYSIWYG editing capabilities provided by SitecoreAI.

The `metadata` property of a field object contains contains various metadata for the field, including its item ID, type, raw value, datasource item ID, and more.