I noticed something odd in Bloqs. When viewing a Live Preview, if I do a conditional to see if the template should display Bloqs data or a summary, it does not work in LP, but works otherwise just fine on the front-end (has been for ages). For example:
{if blog_blocks}
<div class="blog-post__content" itemprop="articleBody">
{blog_blocks}
... fields here...
{/blog_blocks}
</div>
{if:else}
{blog_summary}
{/if}
That does not work, even when I’m step debugging the replace_tag method in ft.bloqs.php, it clearly has content, but when trying to render the template in LP, the conditional does not evaluate to true. It will work though if I check to see if it is a LP, but this seems like a jank fix. Why would that conditional work fine outside of a LP request, but not inside a LP request?
{if blog_blocks || is_live_preview_request}
<div class="blog-post__content" itemprop="articleBody">
{blog_blocks}
... fields here...
{/blog_blocks}
</div>
{if:else}
{blog_summary}
{/if}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.