How to Override streams views globally
Created 6 years ago by srinivas214

Hi, I have published the streams and tried to edit table.twig in views folder but it is not working. Though the views from streams are published but still the streams views from the vendor folder are loading. Please help me with information to solve this.

Thanks in Advance!

piterden  —  6 years ago

$overrides array prop in your addon SP

srinivas214  —  6 years ago

Thanks @piterden but I wants that to add in every addon/module. I should be able to add from a single place so that it overrides in every addon/module.

ryanthompson  —  6 years ago

@srinivas214 You can publish the addons with addon:publish and same with streams using streams:publish I think it it. Then just edit the resulting views in the resources/REF/... folder.

piterden  —  6 years ago

@ryanthompson and how to override JS files?

ryanthompson  —  6 years ago

@piterden override the views including them and replace the asset_add instances with your own resources.

piterden  —  6 years ago

Why can't asset work similar like view loader, and search for files inside chain of folders?

vargvinter  —  6 years ago

For me streams:publish does not work too. I want to tweak form/partials/translations.twig but changes only occurs when I edit files in vendor. Checked in Windows under XAMPP and in Vagrant/Homestead.

Similar problem is with validation translations.

Under XAMPP editing /resources/default/streams/lang/xx/validation.php does not take effect. But works in Vagrant. Moreover, when I want to add translations for language that does not exist in /resources/default/streams/lang it does not work. For example I want translations for polish, so I create pl folder and validations.php file within it with messages translated to polish. After changing language in admin panel to polish, default messages (english) are displayed.

BUT! If I create pl folder (with all files within it) in vendor/anomaly/streams-platform/resources/lang/ then streams:publish and then spit twice over the left shoulder I am able to display polish locales correctly.