Ions (globals)
Ions are a type of atom that are used to define global, single instance content such as navigation, footers or settings.
Creating an Ion
The molecule
function is used to define the atom. The first argument is the name of the atom, and the second argument is an object that defines the fields.
import { ion, email, text } from '@iridiumcms/core';
export const contact = ion('contact', {
address1: text(),
address2: text(),
email: email(),
phone: text(),
});
Ion names should be singular and describe the type of content that will be created.
Ions are exposed under the ions path of the API and are surfaced as creatable content in the admin under "Ions".