View more context



@StefGuev you don't need to edit anything, it's a default setting for the config system (as is any private static $variable_name). To override you should use e.g. mysite/_config/urlsegments.yml Where that contains:

  1. ---
  2. Name: siteslugfilters
  3. ---
  4. SilverStripe\View\Parsers\URLSegmentFilter:
  5. default_replacements:
  6. '/&/u': '-and-'

and so on until they are all there except the one you want (or have modified the one you need to. You will probably need to null it out first though, you can read more information here:

I believe setting a config value to null will 'zero' it out these days (previously it was merge only). You can then use another rule After the first (see further down the same docs above) to set appropriately.

Another option would be to do it only on the instance of the filter you want, via setAttributes as above. Or you could set attributes globally in mysite/_config.php - although I'm not sure I'd recommend that last one for performance reasons.


So, I have a module installed with a config.yml named:

  1. ---
  2. Name: orderconfig
  3. ---

In my app folder (mysite), if I add:

  1. ---
  2. Name: app
  3. After:
  4. - 'framework/*'
  5. - 'cms/*'
  6. - 'orderconfig/*'
  7. ---

does this mean my config should be loaded after the module?


so my custom updateCMSFields() gets called after the module's?

Dennis Basa Guinto

It's just a priority thing for config values. Doesn't affect when a module is being loaded.