# Adding metadata to a template

!!!info
**Metadata** is the actual data that displays in your template. You will generally define it in the template editor using the key-value pairs found in the JSON of your **indexed data**.
!!!

<div>
  <script async src="https://js.storylane.io/js/v2/storylane.js"></script>
  <div class="sl-embed" style="position:relative;padding-bottom:calc(46.19% + 25px);width:100%;height:0;transform:scale(1)">
    <iframe loading="lazy" class="sl-demo" src="https://app.storylane.io/demo/mb5nssx2bxpn?embed=inline" name="sl-embed" allow="fullscreen" allowfullscreen style="position:absolute;top:0;left:0;width:100%!important;height:100%!important;border:1px solid rgba(63,95,172,0.35);box-shadow: 0px 0px 18px rgba(26, 19, 72, 0.15);border-radius:10px;box-sizing:border-box;"></iframe>
  </div>
</div>

---

If this is an existing or autogenerated section you’ll see a list of **existing metadata** at the top of the template editor.

For an existing or new section you’ll also see an option to **add metadata**.

Adding or editing the metadata uses similar fields to the section itself, but it requires different information.

At the top of the editor, use these three fields to **manage** the metadata:

- Use the **tickbox** to determine whether this metadata item should be displayed as a sub-item in the left-hand navigation menu for the template.
- Use the **label** to give this metadata a name
- Enter a number in the **order** box to determine where in the sub-section this metadata appears. 1 will be above 2, which will be above 3, etc.

Choose a **layout** for your metadata within the section. There are fewer options for metadata than there are for the section.

- **Design** (options: Block, List) determines the basic shape of this metadata
- **Content Direction** (options: Column, Row) determines whether your data is read top to bottom or left to right

Under **Primary Heading**, choose the headings that you want each element of your data to be labelled with, within this metadata section.

Using a **Static Value**, each element of this metadata in this section will be labelled with the same heading. Enter the heading in the Value field. Tooltip can be used to give a description for this heading that’s available as a tooltip.

Using a **Metadata Value**, each element of this metadata in this section will be labelled with the heading that’s in the data.

- The **Path Type** (options: Relative, Base, Linked) determines where you are looking for your data. In CIIM data this will typically be Relative.
- The **Path** is the field heading or part of the data that describes the data (eg ‘content description’ or ‘full title’. If your data is in key/value pairs, in CIIM you will typically use **‘type’** to access this.
- **Placeholder** optionally will appear in the template if no data is available
- **Tooltip** optionally can be used to give a description for this heading that’s available as a tooltip

You can also add a **Secondary Heading** which will appear below the primary heading in the template.

The **Content** section determines the actual data that the template will display in your record, and how it displays.

- The **Additional Styling** dropdown gives you options for coloured highlights in the template.
    - **Cover image** will clip an image to fit the template container.
    - **Contain image** will shrink an image to fit the template container
- The **Path Type** (options: Relative, Base, Linked) determines where you are looking for your data. In CIIM data this will typically be **relative**.
- The **Path** is the field heading or part of the data that contains the data itself (eg a full title or description). In CIIM you will typically use **‘value’** to access this.
- **Placeholder** optionally will appear in the template if no data is available

There are three tickboxes that determine how non-textual data can be displayed

- **Is hyperlink** will format any hyperlinks as live links
- **Is search** will allow a search from within the template.
- **Is image** will display an images in the template

**Tooltip** can optionally be used to give a description for this data that’s available as a tooltip

You can optionally add an **icon** and/or a **flag** to visually distinguish your data 

Finally, **Save** the metadata in your section, to see the changes reflected in the template currently displaying your rich data.
