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

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

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.