1

Is there any way for you to conditionally display a static block? For example, I want a block on the homepage that will only display if there is content in the block. If it is empty, the block should not render.

1
  • We can not save empty static block in admin "Content * required". Can you mention some more information ? – Krishna ijjada Jul 28 '16 at 16:41
0

Well, if the content is empty, then the result will be the same whether or not the "content" is rendered. Nothing will be added to the DOM.

If you are including the block directly with an XML file, then no, that will execute every time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.