Xplain for Craft CMS

Field types

Xplain reads each field's own settings, so its notes are about your field — the options you defined, the columns you named, the entry types you allowed.

Field typeWhat Xplain readsThe TwigLeading advice
Plain Textmulti-line, code, character limit{{ entry.x }}, \|nl2br when multi-lineTwig escapes it; leave \|raw off
Email, URL—an <a> with mailto: or href—
Linkallowed link types{{ entry.x.link }}, .url, .label.element for entry links
Number, Rangedecimals, min/max, prefix/suffix\|numberzero is falsy: is not null
Moneycurrency, min/max\|money.amount is in minor units
Lightswitchdefault{% if entry.x %}plain boolean, no .value
Date, Timedate/time/time zone\|date(…) with a <time> elementstored UTC, shown in site time
Color—.hex, .rgb, .hsl.luma for text contrast
Country—.name, .countryCodelocalised name
Icon—the icon nameCraft stores the name only
JSON—keys straight off the valuealready decoded
Dropdown, Radio Buttons, Button Groupoption values{{ entry.x }}, == 'value', .labelcompare the value, not the label
Checkboxes, Multi-selectoption values.contains('value'), loop for labels.options has every option
Tablecolumn handlesa <table> loop by column handlerows are arrays keyed by handle
Addresses—\|addressformatted for the address's country
Entries, Categories, Tags, Users, Assetsmax relations, sources, file kinds, hierarchy, per-site relations.one() or .all() by limiteager-load it
Matrixentry types and their fieldsa full {% switch block.type.handle %}eager-load it, nested relations too
Content Blockits inner fieldsits fields straight off the valuenothing to loop or eager-load
CKEditor, Redactor—{{ entry.x }}already HTML, no \|raw
anything elsethe value type Craft declares{{ entry.x }} or a loop for queries{{ dump(…) }} in devMode

Every field also gets its translation method, whether it is searchable, whether it is required or conditional in the layout, and where it is used.