How it Works

Blocks and Atoms

Blocks is built on the idea of blocks and atoms.

A block is a logical grouping that represents one complex content type. Examples of a block might be a pull-quote or a captioned image.

A block is made up of atoms. To go with the pull-quote example, a pull- quote would have a content field as one atom and a citation as another. A captioned image would have a file upload field as one atom, a caption as another atom, and maybe some alt-text as a third atom.

You, the developer, define the types of blocks that exist. Defining a block is as easy as giving it a name and deciding what atoms comprise it, much like defining a channel involves giving it a name and deciding what fields comprise it.

Once defined, content editors are free to pick and choose which blocks they want to use in their content. If they want a captioned image after the first paragraph of text, great. If they want two captioned images in a row, more power to 'em. If they decide they don't need a pull-quote on a page, that's perfectly OK.


Your content editors get a nice publish screen in which they can add blocks however they want.

Content editors can reorder blocks, add and remove them, and generally create the rich content they want using the rich content types that you've defined.

The publish layout
The publish layout


On the template side, you can output the blocks with whatever markup works best for you. Because you're free to create the markup you want, you're free to style it however you want.



    <img src="{img}" alt="{alt_text}">
    {if caption}
    {/if caption}

    {if author}


Put those two features together and you get a powerful field type that can create rich, structure content. That's all there is to it.