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

0
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier_cms_block')->toHtml();?>
| improve this answer | |
  • 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.