Skip to content

Commit

Permalink
Fix bug in Sage ACF Blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjohnhanna committed Jul 27, 2021
1 parent 0b037d3 commit 1313c8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ function config($key = null, $default = null)
*/
function template($file, $data = [])
{
if (!file_exists($file) && strpos($file, 'views/blocks/') !== false) {
$file = locate_template($file);
}

return sage('blade')->render($file, $data);
}

Expand Down

0 comments on commit 1313c8f

Please sign in to comment.