# Troubleshooting template errors: blocks and lists


Sections are the building blocks of templates. You can use them to contain headings and metadata, or nest other sections inside them.

When choosing a layout for your section:

  • Use lists, cards or tabs when your data is in an array.
  • Use blocks to contain simple data (eg a rights statement) or an individual item within an array.

# How can you tell if your data is an array?

Generally, your data will be an array if it can have multiple values of the same type, like identifiers, decriptions or materials.

You can also check the indexed data pane of the other formats tab to see the shape of your data.

Data shaped like this, with several numerical indices, is an array:

identifier:
    0:
        type: "object number"
        value: "L1340"
    1:
        type: "PID"
        value: "0O6V-000A-0000-0000"
    2:
        type: "display number"
        value: "L1340"
    3:
        type: "sort number"
        value: "l31340"

Data shaped like this, without indexed elements is not an array:

summary:
    title: "Portrait of Adeline Ravoux, the Innkeeper’s Daughter"

# Correcting templating errors

When you lay out a template, you may sometimes see an error like this:

To fix this error, you may need to:

  • Open the template editor
  • Navigate to the section that's displaying the error
  • Switch the layout to the correct layout for the shape of your data
    • A block for simple data (eg a title or a heading)
    • A list, cards or tabs for data in an array.