
mFilter
Faceted filtering for MODX 3 with SEO URL support


Slugs are SEO-friendly aliases for filter values.
Slugs turn filter values into URL-friendly strings:
| Original | Slug |
|---|---|
| Apple Inc. | apple-inc |
| Red | red |
| 16 GB | 16-gb |
When a filter value first appears, the system creates a slug:
| Column | Description |
|---|---|
| Key | Filter key (vendor, color, size) |
| Value | Original value |
| Slug | SEO alias |
| Created | When it was created |
Type in the search box to filter by:
Select a filter key in the dropdown to show only its values.
Recreates slugs for selected rows using transliteration:
When a slug is deleted:
Actions → Export to CSVCSV format:
key,value,slug
vendor,"Apple Inc.",apple-inc
color,"Red",redActions → Import from CSVUpload a file with columns key, value, slug.
/catalog/vendor_apple/color_red//catalog/apple/red/$mfilter = $modx->services->get('mfilter');
$slugManager = $mfilter->getSlugManager();
// Get slug
$slug = $slugManager->getOrCreate('vendor', 'Apple Inc.');
// 'apple-inc'
// Get value by slug
$value = $slugManager->getValue('vendor', 'apple-inc');
// 'Apple Inc.'
// Check existence
$exists = $slugManager->hasSlug('vendor', 'apple-inc');