A campaign page changes every week, and if each change needs you, the client stops running campaigns. Block pages solve that. You define the set of blocks the site can use — a hero, a text with an image, benefits, testimonials, prices, a call to action — and whoever edits builds the page by stacking them, in any order, as many times as needed.
In Velk this is a flexible field: a list in which each row picks its kind of block, and each kind has its own fields.
Why not a drag-and-drop builder?
In a visual builder the client can do anything, including breaking the design. Here they assemble pages from blocks you designed, and every block comes out in the site's look: freedom within rails. And because the blocks are declared in a file, they live in the theme and travel with it, including in Git if you keep the project's history there.
Ask the AI
Create a Landing page template for Lumen, a language school, so the team can create one page per campaign on their own. Blocks: - Hero: title, subtitle, background image and a button (text and link) - Text and image: title, formatted text, image, and the image on the left or on the right - Benefits: a list, each with an icon, a title and a sentence - Testimonials: a list of quote, student name and course - Call to action: title, sentence and button Each block follows the look of the rest of the site, on a phone too. Validate at the end.
Describe each block like a small form: its name and its fields. The AI creates the page template, the block set and the look of each block.
What the AI does
It declares the page template in site.json with a flexible field and one layout per kind of block, each with its fields. In the theme, it writes how each kind is drawn: the template goes through the page's blocks in order and prints each one with its own HTML and CSS. Then it validates the file and opens the panel to try adding, moving and removing blocks.
In the panel
-
Create the page
In Pages, the client clicks + Create page, picks Landing page and types the title and the address.
-
Add blocks
Below the blocks, the panel shows Add block: followed by one button per kind. Each click adds a block of that kind, open and ready to fill in.
-
Reorder
Each block is dragged by its handle to a new position. Saved blocks load closed, labelled with the kind's name, so a long page reads like an index.
-
Remove
The remove button asks for confirmation, because the block's content goes with it.
-
Save
On the site, the blocks appear in the order they have in the panel.
Designing the block set
- Few blocks that combine well beat many that overlap. Start with the blocks the first pages need, and add one when a real page asks for it.
- An option inside a block — image on the left or on the right, light or dark background — is better than two almost identical blocks.
- Only the fields the block needs. A block can hold lists — a repeater of testimonials, rows of the same fields — and images.
- Check each block on a phone: the client will combine them in orders you didn't plan.
Where a block field can live
A flexible field works wherever a field does:
- In a page template, the client creates as many block pages as needed — the usual case for landing pages.
- In a page declared in
site.json, one fixed page gets a free arrangement: a home assembled from blocks. - In a content type, each entry gets a body made of blocks: a case told in sections.
A page can mix both: fixed fields at the top, like a title and a cover, then the blocks.
Ask the AI
Add an FAQ block to the landing pages: a title and a list of questions and answers. The pages that already exist keep their blocks as they are.
Adding a kind of block changes nothing in existing pages: a new button appears in the panel, and the client uses it where it fits.
Common questions
Can the AI assemble a block page by conversation?
On a page declared in site.json, like a home made of blocks, yes: the AI fills and reorders its blocks with the content commands of bin/velk, on your computer or on the live site. Pages the client creates from a page template are created and filled in the panel.
Can the client create a new kind of block?
No. The block set is part of the theme: a new kind is a request to the AI, which is what keeps it in the site's look.