Is there any way to insert custom block in CMS page in Magento 2.2 alike inserting CMS block in CMS page?
1 Answer
If I get you right about custom block (template.phtml), you need to create custom template in (for example) app/code/<Package>/<Module>/view/frontend/templates/cms/customTemplate.phtml
and then insert this template in a CMS Page via layout update (in admin panel):
<referenceContainer name="content">
<block class="Magento\Framework\View\Element\Template" name="your.custom.name" template="<Package>_<Module>::cms/customTemplate.phtml" before="-" />
</referenceContainer>