Skip to content
  1. Extras
  2. PageBuilder
  3. Section catalog
  4. Pro
  5. Filterable grid

Filterable grid

Section filterable_grid shows rows with filters in the URL. Chunk: pagebuilderpro_filterable_grid. Requires PageBuilder Pro and capability datasources.

  1. Pick a datasource: modx-resources, pagebuilder-tables, or minishop3.
  2. For tables set the table key.
  3. On the site the filter form updates the URL (pb_fg_{sectionId}_*). Pagination keeps search, sort, and f_*.

Pagination in the chunk uses range and foreach. Fenom {for} is not supported here.

Query operators match the dynamic list: eq, contains, in, gte, lte, between, empty, not_empty. Keys sql, php, snippet, and class are rejected. Page size is at most 100.

The section is part of the page context so the HTML cache does not freeze the filter.

Fields

FieldTypeRequiredPurpose
titletextnoSection title
datasourcedatasourceyesProvider and query
limitnumbernoPage size

Render

The form uses method="get". Parameter prefix is pb_fg_{id}_. DatasourceSectionEnricher writes it to filter_param_prefix. Names: search, sort, dir, f_{field}, page. Field id is skipped in the filter inputs.

Pagination is drawn when page_count is greater than 1. An empty result uses lexicon pagebuilder_fe_filter_empty, fallback No items. Errors match dynamic list.

Section data

json
{
  "title": "Catalog",
  "datasource": {
    "provider": "modx-resources",
    "table": "",
    "filters": [],
    "sort": [{ "field": "menuindex", "direction": "asc" }],
    "search": "",
    "limit": 12
  },
  "limit": 12
}

Similar sections