Dennis
Dennis

Reputation: 43

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?

Upvotes: 1

Views: 1684

Answers (1)

user7290573
user7290573

Reputation: 1330

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"}}.

Upvotes: 1

Related Questions