0
我試圖使用以下代碼在自定義phtml文件中調用徽標。Magento 2:如何在phtml文件中調用徽標
<?php echo $this->getLayout()->createBlock("Magento\Theme\Block\Html")->setTemplate("Magento_Theme::html/header/logo.phtml")->toHtml(); ?>
我試圖使用以下代碼在自定義phtml文件中調用徽標。Magento 2:如何在phtml文件中調用徽標
<?php echo $this->getLayout()->createBlock("Magento\Theme\Block\Html")->setTemplate("Magento_Theme::html/header/logo.phtml")->toHtml(); ?>
我們可以稱之爲標誌與下面的代碼..
<?php echo $this->getLayout()->createBlock("Magento\Theme\Block\Html\Header\Logo")->setTemplate("Magento_Theme::html/header/logo.phtml")->toHtml(); ?>