
Slugs
Slugs are SEO-friendly aliases for filter values.
Purpose
Slugs turn filter values into URL-friendly strings:
| Original | Slug |
|---|---|
| Apple Inc. | apple-inc |
| Red | red |
| 16 GB | 16-gb |
Auto-generation
When a filter value first appears, the system creates a slug:
- Transliteration (Cyrillic → Latin)
- Lowercase
- Spaces and special chars → hyphens
- Collapse repeated hyphens
Slugs table
| Column | Description |
|---|---|
| Key | Filter key (vendor, color, size) |
| Value | Original value |
| Slug | SEO alias |
| Created | When it was created |
Editing
Changing a slug
- Find the row
- Double-click the Slug field
- Enter the new value
- Press Enter or click outside
Slug rules
- Latin letters, digits, hyphens only
- No spaces or special characters
- Unique per filter key
- Must not start or end with a hyphen
Search and filter
Search
Type in the search box to filter by:
- Key
- Value
- Slug
Filter by key
Select a filter key in the dropdown to show only its values.
Bulk actions
Regenerate slugs
Recreates slugs for selected rows using transliteration:
- Select rows
- Click Regenerate
Delete
- Select rows
- Click Delete
When a slug is deleted:
- The value stays in the system
- A new slug will be created on the next request
Import/Export
Export
Actions → Export to CSVCSV format:
csv
key,value,slug
vendor,"Apple Inc.",apple-inc
color,"Red",redImport
Actions → Import from CSVUpload a file with columns key, value, slug.
Use in URL
Default URL format
/catalog/vendor_apple/color_red/Custom format via patterns
/catalog/apple/red/Programmatic access
php
$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');Tips
- Edit carefully — changing a slug changes the URL and affects SEO
- Use redirects — when changing a slug, set up a 301 redirect
- Check uniqueness — duplicate slugs for different values cause conflicts
