Skip to content Skip to footer navigation
You are reading the Statamic 6 Alpha docs. πŸ‘€

YAML Fieldtype

A code fieldtype in YAML mode that directly edits and stores YAML instead of an escaped string representation of said YAML.

Screenshot of YAML
The YAML Fieldtype in action!

Overview#

This field is a code fieldtype that gets saved as YAML instead of a string. Your input is validated on save to make sure you don't write invalid YAML.

Hot Tip!

The YAML field is one of the "catch-all" solutions for when there's no better way to work with an odd data structure. Recommended for developers only.

A troll pointing a teaching stick

Data Storage#

You really should know YAML if you're using this field, in which case you'll understand how the data is stored – exactly as written.

Templating#

Refer to the YAML guide on how to work with data in general. We really can't be any more specific here. You understand, right?