new

PageBlocks

PageBlocks is a fast and easy way to integrate layouts into MODX CMS.
The author
Boshnik
Packages
15
Downloads
7 568
Usually answers within a few days
Автор дополнения
Packages
15
Downloads
7 568
Usually answers within a few days
Version 2.8.0-pl
Release date 08.26.2025
Downloads 360
Views 551
Warning! This component requires PHP version 7.4 or higher! If your site uses PHP less than required, the installation of this package could break it.
Warning! This package requires MODX not less than 2.8 !
  • Support MODX: 2 / 3
  • Support PHP: ^8.1

Creating a block of any structure


PageBlocks component is designed specifically for CMS MODX, allowing you to easily create blocks with a variety of structures. Whether you need a block with a single title and text or a complex structure with images, lists and tables — you can freely create and customize blocks according to your needs.


Embedding tables into blocks.


Utilize the functionality of the PageBlocks component to easily embed created tables into your blocks on the MODX platform. This is convenient for presenting data in a structured form, whether it be a price list, schedule, or other data.



Multilanguage


Considering the needs of a multilingual audience, PageBlocks for MODX enables the creation of multilingual blocks, providing information in different languages for users from various countries.



UTM


Built-in support for UTM tags allows you to track the performance of marketing campaigns on your MODX site. You can easily add UTM parameters to links in your blocks and analyze the effectiveness of various traffic sources.



Ready blocks


To expedite the content creation process, the PageBlocks component provides pre-made blocks, ready for insertion onto MODX pages. This allows you to use the same block on different pages.

Versions


The versioning capability in PageBlocks for MODX allows you to save different versions of your blocks. This is useful if you need to make changes but also want to keep previous versions for future use.



Basket


The cart feature in PageBlocks for MODX allows you to save deleted blocks with the possibility of their restoration. This provides a convenient way to manage your blocks and avoid accidental deletion



Collections


With PageBlocks on MODX, you can create tabs or sections on your resource, providing a more convenient presentation of information for managers.



Block synchronization


If you have multiple pages on MODX using the same blocks, block synchronization allows you to make changes in one place and automatically apply them to all pages where these blocks are used.



Powerful copying


The powerful copying features of PageBlocks on MODX make it easier to create new blocks based on existing ones, speeding up the content creation process.

[2.8.0-pl] - 2025-08-26

Added

  • Automatic context initialization for Lang
  • Automatic alias generation for pbResource during API creation
  • Automatic resource detection
  • Global config access for config/app.php (no need to specify 'app' group)
  • Database indexes for pbBlockValue and pbTableValue tables
  • csrf function to generate CSRF tokens for forms
  • Third callback parameter for view
  • MODAuthenticate middleware
  • VerifyCsrfToken middleware support for PUT, PATCH and DELETE methods
  • withBag method for Response class
  • error method to Redirect class
  • JSON-to-array conversion for values field in toArray()
  • Cache service class
  • Log service class
  • Str service class
  • Paginator class
  • pbQuery query builder
  • accepts method for Request class
  • has method for Request class to check parameter existence
  • Automatic service injection into controllers
  • TableBuilderService for dynamic table generation
  • Controller support in mgr (Manager) context
  • CRUDController (automated RESTful resource operations)
  • Priority 1000 for OnMODXInit event
  • Custom table binding in PageBlocks table constructor
  • uri function to get the current page URL
  • core file for default lexicon
  • Route class:
    • controller and fallback methods
    • multiple-level route group hierarchies
  • New View (Fenom) class methods:
    • addAllowedFunctions
    • addAccessorSmart
  • Arr class:
    • depth - determines array nesting (e.g. Arr::depth([1 => [2]]) → 2)
    • isList - checks for sequential keys (e.g. Arr::isList(['a', 'b']) → true)
    • isAssoc - detects associative arrays (e.g. Arr::isAssoc(['a' => 1]) → true)
    • exceptKeys - removes specified keys from array
    • onlyKeys - keeps only specified keys in array
    • mergeByKeyMatch - merges two arrays by matching key value
    • contains - checks if any string value in an array contains the given fragment
    • clean - removes empty values (including empty arrays)
  • pbFetch class:
    • support for dynamic parameters {value}, {id}, {name} in URL
    • support for multiple events in the pb-trigger attribute (e.g., "load,click")
    • new load event for automatic handler execution on page load
    • put, patch and delete methods
    • callback functions to the ajax method in pbFetch class for handling different request stages:
      • before - called before the request execution begins
      • success - called when the request succeeds
      • error - called when the request fails (non-successful HTTP status)
      • after - called after request completion (always, regardless of the result)

Fixed

  • Middlewares in routes
  • Video field saving issue in text editor
  • Current user's object field map
  • Table saving error when field names are not unique
  • config helper
  • route modifier

Changed

  • Major refactoring to improve maintainability (all classes affected)
  • Updated request helper to support:
    • Value access: request('id') → returns input value
    • Instance access: request() → returns Request object

Removed

  • System setting pageblocks_parser