The vision for ContentBlocks 2

If you joined us in Berlin for our 10-year anniversary party, attended the 2024 SnowUp in Switzerland, or visited Brighton for the MODX Meetup in June, you already know our goals for ContentBlocks 2.0 and have seen the work-in-progress first-hand. However, we apparently never blogged about it until now.

ContentBlocks 2.0 is a big step forward for managing content in MODX. While version 1.x brought revolutionary ways of managing content to MODX, over a decade since its first release it also has issues we want to address that require a full rebuild. This post breaks down the changes in version 2.0 and how it improves on the previous version.

Some common challenges in version 1.x include:

  • Complex layouts: Nesting layouts and repeaters are powerful, but can make things hard to manage.
  • Outdated interface: The design lacks clear visual feedback. We've improved upon this over the years, but it's still very much 50 shades of grey offering limited customization.
  • Unstructured data: The way data is stored doesn't really allow for advanced features like versioning or workflows.
  • Limited interaction: Drag-and-drop features can be clunky, and previews didn’t look like the final output.

We've been working on version 2.0 to fix these problems, and completely re-architect the way it works internally to make more powerful features happen.

Primary goals for ContentBlocks 2.0

1. A new JavaScript framework

The user interface has been completely rebuilt using a simpler yet more powerful JavaScript framework. No more jQuery; but a modular base that can be extended.

The code is cleaner and more flexible. Compared to a decade of spaghetti, the framework in ContentBlocks 2.0 is allowing us to create new features and allow extensions so much easier.

While we explored building on frameworks like Vue or React, we opted to build our own reactive solution. A bit more work upfront, but as our tools are meant to last a decade, frameworks tend to move too quickly and aggressively for the stability we need.

    2. Re-imagined user interface

    ContentBlocks 2.0 takes the concepts you know and love, but makes them more visual and interactive. The interface is now more intuitive and user-friendly:

    • Visual content: You can see content the way it will look on the website and use plugins (more on that below) to make the preview react to field properties. This means much fewer input fields, and more editable content where you just focus on what you want to change.
    • Expandable context: Selecting a Block will make it expand with more information and properties. This keeps the interface and content clean, while offering the full context and capabilities when focused.

    3. Better data structure

    Each block is now stored as its own row in the database. This makes it possible to:

    • Handle complex tasks more easily. For example, features like rebuilding content when templates change can be targeted to pages that use a changed block or layout. And we can add extensions that add translations or versioning, as each block has it own ID. 
    • Scale up for larger projects or pages without performance issues.

    4. New plugins

    Plugins let developers add features directly in the editing interface. For example:

    • Custom styling: Adjust how blocks look or behave. We already have several plugins that allow you to make the way a block looks react live to changes in block properties. For example, if a user chooses an alert type, it is very easy to make the content in the manager actually look like the chosen alert type immediately.
    • Extra tools: Plugins can add extra tools to Blocks or Layouts. Making a Block/Layout full-screen, highlighting blocks that have been modified since the last save, invoking ChatGPT to improve or suggest writing... whatever you set your mind to can be integrated directly on the canvas. 
    • Copy & paste: Building on top of the new data structure and extensibility of blocks, you'll be able to copy a Block and paste it somewhere else - even on a different page.

    5. Flexible Setup and Templating

    There is more control over how blocks are set up and displayed:

    • File-based configuration: Configuration for your blocks and layouts are stored in files, making it super easy to incorporate into your version control and to share them with your team or the community.
    • PHP API: Create and manage layouts using code. No longer will you need to meddle with undocumented JSON structures, or worry about the new data structure that persists data to individual rows. Instead, a fluid PHP API will let you build out or make programmatic changes to content by building the structure in PHP.
    • Support for multiple parsers: Starting with Twig, the MODX parser, and pdoTools/Fenom support, you can declare different parsers for your Blocks and Layouts and even bring your own.

    Migrating to 2.0

    From the beta release on-wards, we will have a migration toolkit available to help you move existing sites from version 1.x to 2.0. Most migrations should be quick and easy with a 3-step process:

    1. Prepare: ContentBlocks 2.0 parses your 1.x configuration and creates a fresh set of Layouts and Blocks matching your previous set up and suggested implementations in 2.0. It will flag configurations it can't automatically transform. You can now use ContentBlocks 2.0 on new resources to test and tweak the configuration. Existing resources will be temporarily locked to preserve your content. 
    2. Migrate: Either manually per-resource, or automatically for your entire site, parse 1.x content into the new 2.0 canvas. This rewrites your content into your new configuration, so you can keep editing content originally written in ContentBlocks 1.x.
    3. Cleanup: Optionally, remove the old 1.x content and configurations to clean things up.

    But, there will be no rush to upgrade. ContentBlocks 1.x will continue to be supported for at least 2 years after the 2.0 stable release.

    Roadmap: where are we now?

    We’re a small team with lots of products and services for clients worldwide, so finding time to work on ContentBlocks 2.0 has been a challenge. We've seen some great sprints, but also months where we simply haven't had the time to work on it. We want to change that this year and stay focused on getting this rebuild done.

    To bring more focus to the development, we've updated our roadmap and re-prioritised all tasks into the the different release phases.

    • The alpha release signifies when the public-facing APIs and architecture are done. That means the core UI framework and extensions points are stable, and any major core features we have planned for the stable release can be build upon that. Once we hit alpha, we will also start giving access to early adopters to start giving real-world feedback. During the alpha phase, we will continue to add input type, plugins, and other features.
    • The beta release signifies ContentBlocks 2.0 is mostly feature complete, and that the migration toolkit is ready to upgrade simple sites from 1.x to 2.0. While production use will still be discouraged in beta, it will be feasible for the majority of projects.
    • For stable, we require a stable product that is suitable for at least 95% of existing clients and a detailed roadmap for the releases after.

    Right now, we're probably around 70% done with the core framework.

    Timeline & Funding

    At our current pace, the alpha version is still at least 9 months away. We’d love to speed things up, but to do that, we need more funding.

    In the next few weeks, we’re starting a fundraising campaign to give us the resources we need to focus on ContentBlocks 2.0 and release it this year. With extra funding, we can say no to consulting projects that help pay the bills but take time away from ContentBlocks. It also means we can hire more help. Now that the core framework is almost done and the roadmap is up-to-date, it becomes easier to delegate developing specific features, which will make progress much faster.

    Agencies that support us by sponsoring the development will get exclusive perks, like monthly developer videos with progress updates and feature highlights. You’ll also receive license upgrades, VIP tickets to the launch party, and private workshops for your team when ContentBlocks 2.0 launches.

    At higher support levels, you’ll get real-time access to our GitHub repository, premium support hours, and for top tier support, we'll even arrange a group accommodation with a stocked fridge for the launch party weekend for you and your team! 

    Up next

    In the coming weeks, we'll share another blog post with a more detailed breakdown of the remaining work on our roadmap towards alpha, and launch the fundraising. We're excited for 2025 to be the year we can bring ContentBlocks to life and into your hands!