Search code examples
storemagento2country

Magento 2: Get store country full name in CMS pages


I want to show the store country full name in a CMS page.

When using:

{{config path="general/store_information/country_id"}}

It's only showing the 2 letter code. Like "FR". But I want to show "France".

For phtml/php you can use this solution.

But how to solve this for CMS pages and Blocks?


Solution

  • Not the most elegant solution, but you could create a PHTML file from the solution you linked to, then call that from inside your page/static block with {{block class="Magento\Framework\View\Element\Template" template="Vendor_Module::myfiles/myfile.phtml"}}.