Skip to content
version 3.0.0-alfa

A block builder and a framework for MODX

Editors assemble pages from ready-made blocks and never touch the markup. Developers write models, routes and templates the way they would in a modern framework. One extra covers both halves of the project.

The free edition runs on an unlimited number of sites

  • MODX 3.0+
  • PHP 8.2+
  • Eloquent
  • Phinx
  • FastRoute
  • pbFenom
A block builder and a framework for MODX
Foundation

Not homemade — tools you already know

PageBlocks has no ORM of its own and no router of its own. Its four load-bearing layers are libraries you already know from any modern PHP project.

Eloquent

database

Models, relations, scopes and the Illuminate query builder — straight over the MODX database. A field an editor added in the constructor reads as a plain model property: no accessors to write.

core/App/Controllers/PageController.php
model('PbResource')
    ->published()
    ->with('blocks')
    ->limit(10)
    ->get();
Read more

Phinx

schema

The schema of your own tables is described by migrations and travels with the code — no xPDO maps to rebuild. In the paid edition migrations run right from the manager.

core/App/Database/migrations/CreateOrders.php
$this->table('orders')
    ->addColumn('total', 'decimal')
    ->addIndex(['user_id'])
    ->create();
Read more

FastRoute

routing

Your own addresses, not just resource aliases: methods, path parameters, groups, middleware. Routes are files in core/App/routes and are picked up automatically.

core/App/routes/web.php
Route::get('/order/{id}', 'OrderController@show')
    ->middleware('auth');
Read more

pbFenom

templates

A hardened fork of Fenom shipped as a Composer package. One engine for chunks, file templates and MODX templates. Your own modifiers and tags live in the site layer and survive an update of the component.

core/App/elements/pages/catalog.tpl
{foreach query('site_content')
    ->where('template', 4)->get() as $page}
    <a href="{$page->uri}">{$page->pagetitle}</a>
{/foreach}
Read more
Who it is for

One install, three workplaces

The component does not force an editor to open code, nor a developer to assemble logic with a mouse. Everyone works where it suits them and nobody is in the way.

01
Editor

Assembles a page alone

Pick a block from the list, fill in the fields, reorder, publish. The markup stays as it is — a developer described it once.

  • Reorder blocks by dragging
  • Deleted items wait in the bin
  • Versions: roll back to any edit
02
Junior developer

Gets by without code

Blocks, tables, fields, tabs, panels and menus are created right in the manager. A first site on PageBlocks can be built without opening an editor.

  • 39 field types
  • Tables with search and filters
  • Seven snippets for MODX templates
03
Professional

Keeps the logic in the repository

Controllers, routes, middleware, validation rules, templates and the API are plain files in your IDE: under version control, visible in a diff, open to review.

  • Eloquent models and Phinx migrations
  • Your own routes and middleware
  • REST API with tokens and OpenAPI
Features

Why choose PageBlocks

A block of any structure

A block type is described once — a name, a chunk or a file template, a set of fields — and from then on it goes onto any page. An editor picks it from a list, fills in the form and reorders by dragging. Fields live in JSON, so a new one costs neither a migration nor a column: add it in the constructor and output it in the template.

A block of any structure

39 types of fields for blocks and tables

Text, numbers, dates, files, images, video, maps, relations between records. Fields describe the structure of a block or a table row — and an editor fills in exactly what is needed, with nothing extra.

Tables as part of the content

Repeating data — slides, specifications, team members, a price list — lives in a table and attaches to a block through a single field. Rows are edited right in the form of the block. Grid columns are configured separately from form fields: eight ways to render a cell, several fields in one column, and a fallback to the first non-empty value.

Tables as part of the content

Filters and search without a line of code

The filter form is assembled from the fields of the table on its own, and the pbFilters snippet renders it on the front end — no template to write. The operator follows the type of the field: equals, greater, less, between, before, after, contains, starts with, is in a list — thirteen of them. Every table also gets system filters by creation, update and publication date, and the sets you need often become buttons in the toolbar.

Filters and search without a line of code

Reusable blocks

One block across many pages: the phone number in the header, a promo banner, the legal details. Edit it in one place and it changes everywhere it stands. So the picker does not fill up with noise, visibility is narrowed by six conditions: template, parent, specific resources, user groups, users, model.

Reusable blocks

Versions

Creating, editing, copying and deleting a block or a table are recorded automatically — nested tables included. Any snapshot is restored with one button, so an editor can experiment freely: there is no way for them to break a page beyond undo.

Versions

Recycle bin

Deleted blocks, tables and rows do not vanish at once — they sit in the bin and come back as they were. Restoring also revives synchronisation: copies of a reusable block start receiving edits again. Only deleting from the bin itself is final.

Recycle bin

Your own fields on resources and users

Tabs and panels on the MODX resource and user forms — with the same fields the constructor uses everywhere else. This replaces a pile of TVs: three placements to choose from — a separate tab, a collapsible panel, or right among the standard fields. Resource values go into its properties and travel with it when duplicated; user values go into the profile.

Your own fields on resources and users

Multilingual without copies of the tree

No duplicated resources and no separate MODX contexts: the language is an attribute of a block, a table row and a resource. What has not been translated stays a single copy and needs no attention. The main language lives without a prefix in the URL, the rest get their own. Each language can carry its own system settings: site name, sender address for mail.

Multilingual without copies of the tree

Machine translation from the manager

Translate a field or a table row right in the manager, with five providers to choose from. For the language models the prompt is configurable — by default it asks for the translation only, preserving HTML and placeholders. A provider failure breaks nothing: the original text comes back and the reason goes into the MODX log.

ChatGPTClaudeGeminiGrokDeepL
Switching provider is a one-line settings change
Machine translation from the manager

UTM tags

A tag is a name for a set of URL parameters. A block tied to one appears only when the parameters match: its own headline for an ad group, its own promo for a channel, its own offer in an A/B test. A block with no tag always shows, so a direct visit still gets a whole page.

UTM tags

Block synchronisation

Ties blocks that are already placed: an edit to any of them reaches the rest, with no leader and no follower. The set of synced fields can be narrowed — keep the text shared but leave every page its own image. Values diverge, structure does not.

Block synchronisation

REST API and tokens

Any constructor table is published to an external API with a checkbox: a public name, a set of fields, the allowed operations. Tokens are issued in the manager — with scopes like orders.read, an expiry date and an owning user; only a hash is kept on the server. Filters, search, sorting, field and relation selection are query parameters. The OpenAPI spec and Swagger UI are generated, so they cannot drift from the code.

GET /api/pb/v1/objects/orders
# Токен выпускается в менеджере, права — orders.read
curl -H "Authorization: Bearer $TOKEN" \
  "/api/pb/v1/objects/orders?filter[status]=new&sort=-id&limit=20"

{
  "success": true,
  "data": [ { "id": 184, "status": "new" } ],
  "meta": { "total": 37, "limit": 20 }
}
And there is more

The small things usually missing

Things other projects write a custom extra for, or patch the core to get. Here they already ship.

39
field types for blocks and tables
7
snippets for plain MODX templates
4
proven libraries under the hood
0
lines of code to put a block on a page
Questions

Asked most often

MODX 3.0+ and PHP 8.2+. The installer checks both: Eloquent 12 and Phinx 0.16 simply do not run on older PHP.

The block and table constructor, the whole framework, seven snippets, the recycle bin and the everyday set of fields. It is a working page builder, not a demo: you can build and run a site on it.

The package is the same one. Put the key you bought into the pageblocks_license_api_key system setting and reload the constructor — the locks disappear from the tabs. Nothing is reinstalled and no data is touched.

No. Seven snippets reach PageBlocks from a plain MODX template — paste a call and get the output, with no controllers and no routes. Moving to the framework as a whole can be gradual, or can never happen at all.

The composition of blocks and tables lives in the database, where the editor edits it every day. The output logic lives in files in the repository. Moving a construction from development to production is what the constructor backup is for: the whole thing in a single file.

Deleted blocks and rows go to the recycle bin and can be restored. Blocks and tables keep a history of edits with a rollback to any snapshot. Only deleting from the bin itself is final.

Check out PageBlocks

It is more than a block builder. The documentation covers everything it is made of.

Read documentation
Pricing

Create websites with ease

You are gonna love your next project.

Basic

Free
Unlimited sites
  • 29 field types
  • Block Builder
  • Table Builder
  • Table Export
  • Basket
  • UTM
  • Reusable blocks
  • Block synchronization
  • Resource & user sections
  • Menu builder
  • Migrations from the manager
  • Multilanguage
  • Versions
  • Routing & redirects
  • REST API & tokens
  • Moderation, search, filters
  • Telegram Support
Download

© PageBlocks 2019-present