[SOLVED] Using Sage's @include in Gutenberg block

I’ve created some components which I’m including by using @include. However, when I try to use it in a custom Gutenberg block, it just outputs the whole @include as text. Is there a way to fire the @include within a Gutenberg block, or should I include my components through get_template_part?

If yes to the last question: what’s the folder structure I should use to target my component (button.blade.php) in get_template_part()? I can’t seem to hit the right folders.

Edit: I actually found a solution just after posting this. You can find it here, just remember to add echo before view, so it actually gets displayed :sweat_smile:

1 Like