field_type and custom view file in the frontend
Created 7 years ago by huglester

so I publish view like so: php artisan addon:publish anomaly.field_type.text

but when I edit the resources/default/addons/anomaly/text-field_type/views/input.twig, the changes are reflected in the backend as well as backend. What to do if I want to reflect only frontend?

thank you

ryanthompson  —  7 years ago Best Answer

You can override this view with protected $overrides from your public theme.

ryanthompson  —  7 years ago

Or by using the addons/(vendor)/(slug)-(type)/(path) override method as well.

huglester  —  7 years ago

I have updated now the: class StarterThemeServiceProvider extends AddonServiceProvider {

/**
 * The view overrides.
 *
 * @var array
 */
protected $overrides = [
    'streams::errors/404' => 'theme::errors/404',
    'streams::errors/500' => 'theme::errors/500',

    'anomaly.field_type.text::input' => 'theme::forms/text',
];

}

later added the: core/pyrocms/starter-theme/resources/views/forms/text.twig

and now it's ok