elgentos / magento2-elasticsuite-prismic-search

Magento 2 ElasticSuite Prismic Search
1 stars 0 forks source link

Ability to remove slice blocks #10

Closed peterjaap closed 2 years ago

peterjaap commented 2 years ago
            var_dump($layout->getChildName('prismicio.landingpage.body', 'prismicio.landingpage.body.currated_content'));exit;
            var_dump($layout->getBlock('prismicio.landingpage.body.currated_content')->getNameInLayout());exit;
                    <action method="append">
                        <argument name="element" xsi:type="string">raw_html</argument>
                        <argument name="alias" xsi:type="string">prismicio.landingpage.body.raw_html</argument>
                    </action>

We can't put prismicio.landingpage.body.raw_html in the blacklist since at that point we don't know it's alias yet, but only raw_html. If we add raw_html to the blacklist, all blocks containting raw html will be removed.

So we want to prefix it with the content type internal name, like this;

landing_page::raw_html

And then parse that configuration and remove that block.

peterjaap commented 2 years ago

https://github.com/elgentos/magento2-elasticsuite-prismic-search/commit/6a0f96369459658a0873a5dc061a5b572c077801