Skip to content
mFilter
mFilter
Faceted filtering for MODX 3 with SEO URL support
  1. Extras
  2. mFilter
  3. Manager interface
  4. Filter sets

Filter sets

The central mFilter entity — defines which filters are available on catalog pages.

Creating a set

  1. Click Create
  2. Fill in:
    • Name — for identification in the admin
    • Description — optional
    • Active — enable/disable

Set tabs

Filters

List of filters in the set. For each filter:

FieldDescription
KeyUnique identifier (vendor, color, price)
TypeFilter type (default, number, boolean, vendors...)
SourceData source (option, tv, field, resource)
FieldField/option name (for source=option, tv, field)
LabelDisplay name
ActiveWhether filter is enabled
OrderSort order in the form

Filter types

TypeDescriptionUI
defaultStandardCheckboxes
numberNumeric rangeSlider + inputs
booleanYes/NoToggle
vendorsMS3 vendorsCheckboxes
parentsParent categoriesCheckboxes
colorsColors (with HEX)Color swatches
dateDate rangeDate picker
yearBy yearCheckboxes
monthBy monthCheckboxes

Data sources

SourceDescriptionField
optionMiniShop3 optionsOption name (color, size)
tvTemplate VariablesTV name
fieldResource fieldsField name (pagetitle, template)
resourcemsProduct/msCategory fieldsData field (price, weight)
ms3Special MS3 fieldsvendor, category

Bindings

Defines which pages the filter set applies to.

Resource tree:

  • Select catalog categories
  • Check the resources you need

Options:

  • Include children — set will apply to child pages as well

Settings

Extra set options:

SettingDescription
Default sortResult sort field
Sort directionASC or DESC
Default limitItems per page
Show emptyShow filters with no values

Configuration examples

MS3 product catalog

json
{
    "vendor": {
        "type": "vendors",
        "source": "ms3",
        "label": "Vendor"
    },
    "color": {
        "type": "colors",
        "source": "option",
        "field": "color",
        "label": "Color"
    },
    "size": {
        "type": "default",
        "source": "option",
        "field": "size",
        "label": "Size"
    },
    "price": {
        "type": "number",
        "source": "resource",
        "field": "Data.price",
        "label": "Price"
    },
    "new": {
        "type": "boolean",
        "source": "resource",
        "field": "Data.new",
        "label": "New"
    }
}

Catalog with TV

json
{
    "brand": {
        "type": "default",
        "source": "tv",
        "field": "product_brand",
        "label": "Brand"
    },
    "material": {
        "type": "default",
        "source": "tv",
        "field": "product_material",
        "label": "Material"
    },
    "year": {
        "type": "year",
        "source": "tv",
        "field": "product_year",
        "label": "Year"
    }
}

Article catalog

json
{
    "category": {
        "type": "parents",
        "source": "resource",
        "label": "Category"
    },
    "author": {
        "type": "default",
        "source": "field",
        "field": "createdby",
        "label": "Author"
    },
    "date": {
        "type": "month",
        "source": "field",
        "field": "publishedon",
        "label": "Publish date"
    }
}

Deleting a set

When a set is deleted:

  • All resource bindings are removed
  • Slugs and SEO templates are kept