I have redirection from controller to CMS page with custom message defined using messageManager.

It show up the message before my CMS page content begins (below header part). but i want to display that message above specific block of that CMS page.

This is how my CMS page is

/*** HTML content ***/
{{block name="custom-form" class="Magento\Framework\View\Element\Template" template="Vendor_Module::custom_form/index.phtml"}}

How can we do it?

I have referred this link which suggests to make change in layout file, which won't be useful in my case.

Can Layout Update XML of Design section of CMS page be useful in this case? I wrote below line in that field but no effect.

<move element="page.messages" destination="custom-form" />

Or is there any way to move message inside custom_form/index.phtml ?


Your Answer

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

Browse other questions tagged or ask your own question.