In the comments section of The Perfect Bricks Page Template tutorial, a user asks:
Could this be modified so that instead of has_blocks it used something like has_bricks? I’d like to take the structure that you have (Gutenberg Content section followed by Bricks div) and have it render the Gutenberg content only if the page isn’t built with Bricks and use the Bricks div only if the page IS built with Bricks.
It’s a small distinction, but it’s because I often will build a page with Bricks and put the WPcontent element in the layout somewhere. When I do, I won’t want the first section (Gutenberg) to display because then there would be duplication.
Currently I use a similar setup where the two sections display based on a Metabox switch on each page. I’d prefer to not have to toggle that switch because it often gets forgotten.
This Pro tutorial provides the steps to define a custom function that returns true or false depending on whether the current post (typically, a Page) has Bricks content and using the function with a dynamic data Bricks condition to output Bricks content when a Page is built with Bricks or WordPress content when there is no Bricks content.
Step 1
Add the following in child theme‘s functions.php (w/o the opening PHP tag) or a code snippets plugin:
<?php
function bl_post_has_bricks_content(): bool {
return ! empty ( get_post_meta( get_the_ID(), BRICKS_DB_PAGE_CONTENT, true ) );
}
Step 2
Whitelist the bl_post_has_bricks_content function.
Ex.:
<?php
add_filter( 'bricks/code/echo_function_names', function() {
return [
'bl_post_has_bricks_content'
];
} );
You should also add other functions (native or custom) being used in your Bricks instance besides bl_post_has_bricks_content. This can be checked at Bricks → Settings → Custom code by clicking the Code review button.
More info on whitelisting can be found here.
Also whitelist has_blocks function.

Step 3
Edit the Template that applies to all Pages.

Set up the structure like this:

“Post Content” element inside the “WP Content Section” has its data source set to WordPress.
“Bricks Content” has its data source set to Bricks.
Apply this condition on the “WP Content Section”:

{echo:bl_post_has_bricks_content}