Last active
October 22, 2021 07:05
-
-
Save webgurus/96839c415a48e9b21ebe6d586f49b557 to your computer and use it in GitHub Desktop.
The flexible content page builder content part
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if($page_builder) | |
@foreach ($page_builder as $block) | |
@include('partials/page-builder/'.$block->block_type) | |
@endforeach | |
@endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a file called /partials/content-flexible.blade.php
Then all the block partials (matched by the name of the flexible block) will be automatically loaded from /partials/page-builder/.
E.g. if you have a flexible block called "two_column" then it will automatically search for a blade partial named /partials/page-builder/two_column.blade.php