I’ve got an issue, first the code block:
<?php if ($card->story()->isNotEmpty()): ?>
<p><a href="<?= $card->url() ?>">Continue</i></a></p>
<?php endif ?>
story() is a blocks field, defined as this in blueprint:
story:
label: Post
type: blocks
Now, in the initial state when I don’t add a text to “story”, the snippet above works as intended. “Continue” isn’t shown.
But now when I add some text to “story” and delete it again, it stops working. Now I looked directly in text file to see what’s stored to story file when everything is deleted and I see this:
----
Story: []
----
When I manualy remove the brackets, snippet works again. Is there a way to stop CMS from creating brackets when the content of story is being deleted from panel or is there a workaround snippet for solving this situation=