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?

6x certified Magento Specialist.
Nigel Boulton, Magento Solution Specialist
1 REPLY 1

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

6x certified Magento Specialist.
Nigel Boulton, Magento Solution Specialist