cancel
Showing results for 
Search instead for 
Did you mean: 

XML to target one CMS Page

XML to target one CMS Page

I want to add custom blocks programatically to a CMS page. If I target cms_page_view it works but obviously would affect all CMS pages - I want to be able to restrict this to one CMS page

 

Is there a equivalent of PRODUCT_<id> in Magento 2 for CMS Pages?

Triple Certified Magento Specialist.
Magento Solution Specialists
1 REPLY

Re: XML to target one CMS Page

The answer I came up with was to use cms_page_view.xml and then check the current URL to ensure I was on the right page.
Not a particularly elegant solution but works

Triple Certified Magento Specialist.
Magento Solution Specialists