Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected template behavior #41

Open
illuminate3 opened this issue Feb 24, 2017 · 1 comment
Open

Unexpected template behavior #41

illuminate3 opened this issue Feb 24, 2017 · 1 comment

Comments

@illuminate3
Copy link

Intended result: IF email field exists show contact form ENDIF

In my template I have this:

            @if (PageBuilder::block('email'))
                {!! PageBuilder::block('contact_form') !!}
            @endif

The idea is to check if the email field exists show the form if not skip it.

By doing that the Block change doesn't see what's in the IF check.

Work around: delete the if/endif and run the block update check. Then paste back the the if conditional.

@chadanuk
Copy link
Contributor

This is probably to do with what the 'email' block is returning.
We've recently added an option to the blocks 'review_return_value' which will force the theme review function to see whatever you pass through like this:

@if (PageBuilder::block('email', ['review_return_value' => true]))
                {!! PageBuilder::block('contact_form') !!}
@endif

This should solve the problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants