Add a view namespace?

Hello there fellow Roots fans!

So in Sage 9 I used to be able to edit


and add something like…

'namespaces' => [
		'SVG' => get_theme_file_path() . '/resources/assets/svg',

Which allowed me to include SVGS blade files like this…

@include( 'SVG::some-svg-file', [ 'color' => '#000' ] )

Is there a way to do the same in Sage 10?

Sure can! See Acorn 2.x: Directory Structure | Roots Documentation for information on publishing config files

1 Like

Awesome! thank you! :slight_smile:

1 Like

Hello Mike,

I recently run into the same issue. I have reviewed the link that Ben shared, tried a couple of things, but I’m still not able to use @include namespaces the same way I did on a Sage 9 theme. Do you mind sharing the configuration that did the trick for you?


Hi psymeon

All I did was add the same config directory in the theme root and added the view.php just like in sage 9 and it worked straight away for me.


sorry for the late reply!

1 Like

Hey @MikeFishtank. That did the trick, thanks!