1

I need to get the content of the cms block without rendering. I need some operation with that content(append some text in middle or at the end & replace some text). After I complete my operations, I render it. Is there any way, if so any once can help me?

3 Answers 3

1

First import and then add identifiers

import CmsBlockGroup from "@magento/venia-ui/lib/components/CmsBlock";
.
.
.
<CmsBlockGroup identifiers={'cms-block-name'}/>

I hope this will help every one.

1
0

I'm having the same problem, even passing the CMS id it doesn't render the content, it just displays the Pagebuilder html, that default structure of it.

But checking in Apollo, in the request the data comes correctly, it's just not mounted on the front-end.

enter image description here

Graphql request enter image description here

0

add array [] <CmsBlockGroup identifiers={['cms-block-name']}/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.