Skip to content
mFilter
mFilter
Faceted filtering for MODX 3 with SEO URL support
  • MODX 3
  • PHP 8.1
  • Vue 3
  1. Extras
  2. mFilter
  3. Manager interface
  4. Word forms

Word forms

Word forms provide declension for words in SEO text.

Purpose

Some languages require declension by case:

CaseExample
Nominativephone
Genitivephone's
Dative(to) phone
Accusativephone
Instrumental(with) phone
Prepositional(about) phone

Word forms table

ColumnDescription
WordNominative form
GenitiveGenitive form
DativeDative form
AccusativeAccusative form
InstrumentalInstrumental form
PrepositionalPrepositional form
PluralPlural form

Creating a word form

1. Click "Create"

2. Fill in the forms

FieldExample
Wordphone
Genitivephone's
Dativephone
Accusativephone
Instrumentalphone
Prepositionalphone
Pluralphones

3. Save

Use in SEO templates

Case modifiers

ModifierCaseExample
`nominative`Nominative
`genitive`Genitive
`dative`Dative
`accusative`Accusative
`instrumental`Instrumental
`prepositional`Prepositional
`plural`Plural

Examples

Title template:

Buy {$filters.vendor|accusative}

Result:

  • Input: Samsung
  • Word form: accusative = Samsung
  • Result: Buy Samsung

Description template:

Wide selection of {$filters.vendor|genitive}. Delivery.

Auto declension

If a word form is not in the database, the system may:

  1. Use the word unchanged
  2. Apply basic language rules (if enabled)

Programmatic access

php
$mfilter = $modx->services->get('mfilter');
$wordForms = $mfilter->getWordFormsManager();

// Get form
$genitive = $wordForms->getForm('phone', 'genitive');
// 'phone\'s'

// Check existence
$exists = $wordForms->hasWord('phone');

// Add word form
$wordForms->add([
    'word' => 'laptop',
    'genitive' => 'laptop\'s',
    'dative' => 'laptop',
    'accusative' => 'laptop',
    'instrumental' => 'laptop',
    'prepositional' => 'laptop',
    'plural' => 'laptops'
]);

Tips

  1. Add brands — Samsung, Apple, Xiaomi often don't decline
  2. Add categories — phone, tablet, laptop
  3. Check output — review generated text
  4. Use import — for large word lists

Common cases

Invariable words

For foreign brands, use the same form for all cases:

FieldValue
WordApple
GenitiveApple
DativeApple
...Apple

Words with alternation

FieldValue
Wordday
Genitiveday's
Dativeday
Accusativeday
Instrumentalday
Prepositionalday
Pluraldays