Sage 9 View Storage Paths

I’ve been trying to add an additional directory to the View Storage Paths in /config/view.php.

/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most template systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views.
|
*/

'paths' => [
  get_theme_file_path().'/resources/updated/',
  get_parent_theme_file_path().'/resources/updated/',
  get_theme_file_path().'/resources/views',
  get_parent_theme_file_path().'/resources/views',
],

Sage finds the templates in the partial & layouts directories, but won’t find any of the page templates like page.blade.php. Am I missing something obvious?

This is how I implemented it.

add_filter('sage/storage/paths', 'template_paths', 1, 1 );

// Sage template paths
public function template_paths($paths = []){
    //Add the new directory to the top of the array so the new directory has priority
    array_unshift( $paths, get_theme_file_path().'/resources/newtemplatedirectory' );
    return $paths;
}
2 Likes