Hello there fellow Roots fans!
So in Sage 9 I used to be able to edit
theme-folder/config/view.php
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?
ben
October 25, 2022, 1:55pm
2
Sure can! See Acorn 2.x: Directory Structure | Roots Documentation for information on publishing config files
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?
Thanks!
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.
edit…
sorry for the late reply!
1 Like
psymeon
February 20, 2023, 10:18am
6
Hey @MikeFishtank . That did the trick, thanks!