I have a modal to show in every page, my modal was created in phtml file which using custom block file. i want to show this modal in every page of magento, is there a way to do this?
you can do this by following layout xml file.
the content would be like this:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> // reference a container to show your model </body> </page>
NOTE: you can refer any core module's layout file for above content.