Open
Description
Preconditions (*)
- Magento 2.3.4
Steps to reproduce (*)
- Create CMS page
- Add CMS Block using PageBuilder
Expected result (*)
- The source should refer to CMS Block by
identifier
{{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/default.phtml" block_identifier="sample_block" type_name="CMS Static Block"}}
Actual result (*)
- CMS block has
id
hardcoded
{{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/default.phtml" block_id="16" type_name="CMS Static Block"}}
Business Case
- Merchant has 2 websites
- He wants to have similar Home Page with only one different block
- He doesn't want to maintain 2 pages each for the website - that is why we inject 1 block, that is declared per-scope
With block declared with ID, you still need to have 2 versions of a page. With CMS Block identified by identifier, GetBlockByIdentifier
is going to take care about the scope.
Developer Experience
- Installing Block with Data Patch
- I want to refer the created block from CMS Page
Without the block reference by identifier - I need to get block by identifier manually and then update the CMS page to refer the block created by Data Patch.