How is it possible to output the current store name in a Magento 2 custom template with a custom block?
Magento 2 – How to Get Store Name in Template
magento2storestemplate
magento2storestemplate
How is it possible to output the current store name in a Magento 2 custom template with a custom block?
Best Answer
you need to use the instance of
\Magento\Framework\App\Config\ScopeConfigInterface
in your block:Create the method
getStoreName()
and call in your template
echo $this->getStoreName()