This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Vojta Svoboda
Vojta Svoboda

Hello,

is there some possibility to override YAML files same way as we can override:

  • configuration files (/config/<vendor>/<plugin>/config.php)
  • language files (/lang/<locale>/<vendor>/<plugin>/lang.php)?

It would be great to override backend form settings (because modifying by Event is little bit hard).

Something like this: /fields/rainlab/blog/models/post/fields.yaml - and there overwrite only 'content' item.

Thanks for reply

Last updated

FelixINX
FelixINX

I don't think that this is possible. But depend on what you build, you can try to extend a plugin.

Vojta Svoboda
Vojta Svoboda

You can extend plugin, but how? I know only extending by Event::listen('backend.form.extendFields') what is little bit complicated.

FelixINX
FelixINX

I'm not sure,

but I have seen this video that is for the Users. What do you want to override?

ashleighsims
ashleighsims

I know this is an old thread, as a note for future answer seekers I do the following to extend .yaml config files.

use RainLab\User\Controllers\Users;
...

Users::extend(function ($controller) {
   // Extending the config_relation.yaml for the Rainlab.User plugin
   $controller->relationConfig = __DIR__ . '/config_relation.yaml';
});

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.