b1gw0rm - 6 months ago

I've tried using the Theme Overrides for Streams as well as the Publish Streams Platform Views option as outlined here:

https://pyrocms.com/help/developer-tools/extending-pyrocms/overriding-views

Neither option works at the moment.

Answer

edster - 6 months ago

Ah I see the confusion, my experience with this is that for platform views you must use the overrides array.

You are correct in your assumption that the views in the correct path of your theme will override other views, however this is limited to ADDONS specifically, not the actual streams platform as a whole.

As in, this wont work for all things in the vendor directory, just addons (modules/extensions/etc)

b1gw0rm - 6 months ago

I was able to get a Stream override working at the Theme level but I had to use the protected $overrides option in the AdminThemeServiceProvider in order for it to work:

protected $overrides = [
        'streams::table/table' => 'theme::streams/table/table',
        //'streams::errors/500' => 'module::errors/500',
    ];

I was under the impression that simply by having the view files in the correct folder structure in your theme/resources/views/stream subfolder that it would automatically override the respective files from the vendor folder. If that's incorrect then I think the documentation is not clear that you also would need to add entries to the $overrides array when doing a theme level override of the Stream view files.

The Publish Streams Platform Views documentation seems to indicate that simply by publishing the files the overrides should take effect from the root Laravel /resources folder where all those files get published. However that full project override does not seem to be working at all at the moment.

edster - 6 months ago

Ah I see the confusion, my experience with this is that for platform views you must use the overrides array.

You are correct in your assumption that the views in the correct path of your theme will override other views, however this is limited to ADDONS specifically, not the actual streams platform as a whole.

As in, this wont work for all things in the vendor directory, just addons (modules/extensions/etc)

b1gw0rm - 6 months ago

I will use the overrides array for the theme specific view overrides. Thank you for your response.

I'd still like to have the php artisan streams:publish option clarified as the documentation says "Publishing addons and the streams platform is a good way to override views per project" and says "Simply change the views as needed and delete the rest that don't need to be overridden" which doesn't seem to be working as intended currently.