SychO Thanks, in flarum/vendor/flarum/core/src/Forum/ForumServiceProvider.php
I indeed see
public function boot(Container $container, Dispatcher $events, Factory $view)
{
$this->loadViewsFrom(__DIR__.'/../../views', 'flarum.forum');
$view->share([
'translator' => $container->make(TranslatorInterface::class),
'settings' => $container->make(SettingsRepositoryInterface::class)
]);
I tried to write
(new Extend\View)->extendNamespace('flarum.forum', __DIR__.'/override_views'),
But still zero luck. I checked that the path __DIR__.'/override_views'
exists.
Weirdly, if I specify a wrong path, Flarum doesn't throw any errors. Seems it doesn't even understand that I'm trying to use my own templates, doesn't launch corresponding code inside extendNamespace()
.