Static content is a thing of the past. Today's users expect rich, dynamic, and engaging digital experiences. But for content teams, being locked into a CMS with only a title field and a single rich-text editor can feel like painting with a single brush. How can they build beautiful, component-based landing pages or intricate product descriptions without constantly asking developers for help?
The answer lies in giving editors the power to compose, not just write. This is where the developer-first approach of Payload CMS shines. By leveraging advanced field types, you can create a structured yet incredibly flexible content-editing experience.
And with studio.do, you can define this entire experience as code and have a custom-branded, fully-managed Payload instance deployed instantly. It's the power of a premier headless CMS, with zero operational overhead.
Traditional CMS platforms often treat content as a single, monolithic block of HTML. This creates two problems:
Payload solves this with a "Business-as-Code" philosophy. You define your content structures with TypeScript, creating a set of "Lego blocks" your content team can use to assemble pages. Let's explore the most powerful tools in your toolkit.
Imagine empowering your marketing team to build a landing page from a palette of pre-approved, beautifully styled components: a hero banner, a call-to-action, a testimonial slider, a feature grid. This is precisely what Payload's blocks field is for.
A blocks field allows an editor to add, reorder, and configure a series of different "block" types within a single field. Each block has its own set of sub-fields.
For example, a Page collection could have a layout field that allows editors to choose between a CtaBlock and a ContentBlock.
import { CollectionConfig } from 'payload/types';
import { CtaBlock } from './blocks/CtaBlock'; // A CtaBlock definition
import { ContentBlock } from './blocks/ContentBlock'; // A ContentBlock definition
const Pages: CollectionConfig = {
slug: 'pages',
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'layout', // The name of our page-builder field
type: 'blocks',
required: true,
blocks: [ // The components our editors can choose from
CtaBlock,
ContentBlock,
]
},
],
};
export default Pages;
With this configuration defined in your codebase, studio.do will generate a UI where an editor can click "Add Block" and choose whether to insert a fully-fledged "Call to Action" or a simple "Content" block. They can add as many as they need, in any order, giving them unparalleled creative freedom within the structured, brand-consistent boundaries you've set.
What if you need a list of items that all share the same structure? Think of a "Team Members" section, a list of product features, steps in a recipe, or FAQs on a page. The array field (often called a 'repeater field') is the perfect solution.
The array field lets you define a set of fields that can be repeated by the content editor as many times as needed.
Let's model a simple "Features" list for a product page:
import { CollectionConfig } from 'payload/types';
const Products: CollectionConfig = {
slug: 'products',
fields: [
{
name: 'productName',
type: 'text',
},
{
name: 'features',
type: 'array', // This will be a repeatable list
minRows: 1,
fields: [ // The fields for each item in the list
{
name: 'icon',
type: 'select', // e.g., 'check-circle', 'bolt', 'shield'
options: ['check-circle', 'bolt', 'shield'],
},
{
name: 'featureName',
type: 'text',
required: true,
},
{
name: 'description',
type: 'textarea',
required: true,
},
],
},
],
};
export default Products;
In the admin panel generated by studio.do, the editor will see a "Features" section with an "Add New" button. Each time they click it, they get a new form with fields for an icon, name, and description. They can add, remove, and reorder these features with a simple drag-and-drop interface.
As your content models become more complex, the admin UI can get cluttered. Payload provides two simple but powerful layout fields to keep things clean and intuitive for your editors.
Here's an example of using tabs to organize an Article collection:
import { CollectionConfig } from 'payload/types';
const Articles: CollectionConfig = {
slug: 'articles',
fields: [
{
type: 'tabs',
tabs: [
{
label: 'Content', // The first tab
fields: [
{
name: 'title',
type: 'text',
},
{
name: 'content',
type: 'richText',
},
],
},
{
label: 'SEO', // The second tab
fields: [
{
name: 'metaTitle',
type: 'text',
admin: { description: 'Optimal title for search engines.' },
},
{
name: 'metaDescription',
type: 'textarea',
},
],
},
],
},
],
};
export default Articles;
This simple structure creates a vastly improved user experience, guiding the editor through the content creation process logically and efficiently.
Defining these advanced structures is the developer's sole responsibility. Once you commit your TypeScript configurations, studio.do handles the rest. Our AI-powered agent provisions a powerful, custom-branded Payload CMS that perfectly matches the business logic you've defined.
By combining the flexibility of Payload's advanced field types with the zero-ops simplicity of studio.do, you can finally deliver the dynamic content experiences your team has been asking for, faster than ever before.
Ready to stop wrangling your CMS and start building? Define your content models as code and let studio.do build the interface today!