0

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

tried

$block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier_cms_block')->toHtml();

But it works for static cms block

1 Answer 1

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