Watch the workflow
Define a reusable page type
Create a Case Study type for an agency site, then make two projects that share its layout while keeping their own content. Download video · Download captionsRead the walkthrough
Read the walkthrough
- Open Pages and choose Manage page types.
- Create a Case Study type for client projects.
- Open its template and enable the project story block.
- Add the project layout to the starting template.
- Create a project using the Case Study page type.
- Give this project its own content.
- Create a second case study using the same template.
- Same layout, different content for each project.
What page types control
A page type defines page fields, shared header and footer sections, starting body sections, and the blocks editors can insert. Page types do not set URL prefixes or publication schedules.Create a page type
You need developer access and at least one site block. You can create site blocks in the page type editor or copy them from the server library.1
Open page types
Open Pages → Manage page types, then choose Create page type.
2
Set the name and appearance
Enter a descriptive name, such as Blog Post, and choose an icon and color. Blog Post is an example name you choose, not a preset.
3
Configure the template
Open the new page type. Add shared navigation to the header and a shared footer to the footer slot. Add body sections if new pages should start with an existing layout.Header and footer sections are shared across pages of this type. Starting body sections are copied to new pages, which keep their own content.
4
Choose available blocks
In the Blocks tab, enable the blocks editors can insert into the body. Include only useful blocks you have built or imported, such as Text, Image, and Quote for blog posts.Leave the available-block list empty for a static page type: editors can fill in its content but cannot add, remove, or reorder body sections.
5
Add page fields
Define fields such as
title (Text), author (Text or Page), publish_date (Date), and featured_image (Image). Use a Repeater with a nested Text field for multiple tags.To display page fields in a block, add Page Field references to that block. A field name alone does not connect a block to page content.6
Verify a new page
Save your changes, create a page using this type, and check its starting layout, fields, and block picker. Create a second page to confirm that body content remains independent while shared sections stay consistent.
Blocks such as Quote, Gallery, and Product Hero are examples you build or import. These names do not identify built-in block presets. A block uses built-in field types such as Text or Image to make its content editable. See the field type reference for supported fields.
Shared content and page content
Use site fields for navigation, branding, and footer content that should stay consistent across page types. Use page fields for titles, descriptions, and other values that vary by page. Use block fields for content specific to a section. A header section can have the same layout on every blog post while displaying each post’s own title through a Page Field reference. Ordinary fields on a shared header or footer section keep shared values.Page URLs
A page’s slug and parent pages determine its URL. For example, create a Blog page with slugblog, then a child page with slug my-first-post to get /blog/my-first-post. The child can use the Blog Post page type, but the type’s name does not add a URL prefix.
The homepage lives at /. In CLI files, page paths follow the folder structure under pages/; pages/blog/my-first-post.yaml maps to /blog/my-first-post.
Metadata and publishing
SEO fields store content; they do not generate tags automatically. Add title and description tags to the page type’s Head HTML, which has access to its page fields:head.svelte
meta_title, title, and meta_description as Text page fields before using this example. Paste the fragment into the page type’s Head HTML without a <svelte:head> wrapper.
A Date field such as publish_date is content metadata. It does not schedule publication. Saved changes become public when you publish the site; there is no per-page draft, auto-publish, or scheduling switch in page type settings.
Define page types in files
A page type uses separate files for configuration, fields, content defaults, and layout:config.yaml contains editor metadata and available block folder names:
config.yaml
fields.yaml is a list, with no fields: wrapper:
fields.yaml
content.yaml stores starting page-field values:
content.yaml
layout.yaml references existing site block folders:
layout.yaml
primo validate -d sites/my-site from the workspace root, then create a page in the CMS to verify the result. Keep exported _id values stable; omit IDs when creating new records.
Next steps
Understanding slots
Choose shared and per-page layouts.
Working with fields
Connect blocks to page and site content.