I created 2 dynamic cms blocks in BE with different Customer Segment, How can I call to them from phtml file?

Please note that dynamic cms block != cms block

dynamic cms block



But it works for static cms block

1 Answer 1

<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier_cms_block')->toHtml();?>
  • it works for static block, not for dynamic Nov 5, 2019 at 6:45
  • What do you mean by dynamic ans static block ?
    – PЯINCƎ
    Nov 5, 2019 at 10:53
  • check screen in description Nov 5, 2019 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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