Call PHTML file In CMS page:
{{block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::html/test.phtml"}}
Call PHTML file in XML:
<referenceContainer name="footer">
<block class="Magento\Framework\View\Element\Template" name="footer.hcontent" template="Magento_Theme::html/footer.phtml">
<container name="hcontent" label="footer content"/>
</block>
</referenceContainer>
Text in PHTML file:
<?php echo __('Create Backup') ?>
If your string contains a variable, to add a placeholder for this variable in the dictionary, use syntax similar to the following:
<?php echo sprintf(__('Hello %s'), $yourVariable) ?>
Like this:
Like Loading...