What Is a Type?
On this page, you'll learn about the concept of page types and custom types.
Types are models for your documents. They are the place where you define and configure fields for your content. They give structure to documents: pages, posts, articles, events, products — whatever blocks of content you need for your project.
You can limit your types to a single usage. A single type might be a home page, a settings file, or a global banner.
Otherwise, your type will be reusable, which means you can create unlimited documents with it. A reusable type might be for landing pages, blog posts, or authors.
Types have two formats: "page" or "custom".
A page type has default metadata fields and a Slice Zone for composing the content of web pages.
A custom type is a generic type that you can use to create menus, taxonomies, configurations, and other entities.
Create page types and custom types in their respective sections in Slice Machine.
From the Page types tab, click Create a page type. Select the type (reusable or single), give it a name, and save.
Create Slices in the Slices tab of Slice Machine. You can use Slices in multiple custom types.
In the Slices tab, create your Slices, save their models to the filesystem, synchronize them with your repository, and see Slice simulations with mock data.
Click on + Add a new Field to see the list of fields you can add to custom types and Slices.
You can use tabs within a custom type to organize your content fields and make document editing more user-friendly. Click the + Add a new tab button in the custom type builder to add a tab.
Using tabs will only affect the organization of the document in the Page Builder, but it will not impact the structure of the document in the API response.
Editing a type does not change the content in your repository — it only changes the model. Changes won't take effect until you open and save documents individually.
If you delete a field in a type, that field will no longer appear in the Page Builder. Until you resave each document individually, all existing documents will still have that field and its data, and the field will still appear in the API response.
Was this article helpful?
Can't find what you're looking for? Spot an error in the documentation? Get in touch with us on our Community Forum or using the feedback form above.