countries

Generates a list of countries available shipping countries

Example

[%countries sortby:'sortorder,name' %]
    [%param *body%]
        <p>[@country_code@] - [@country_name@]</p>
    [%/param%]
[%/countries%]

Usage

The countries tag generates a list of countries worldwide and lets you organise the list by different sort options. In order for the country to appear in the list it has to be set to "active" and available in the control panel, to do this go to Settings & tools > Shipping > Available Countries.

Parameters

Name Options Description
sortby sortorder, name Determines the sort order of the list, by default, is name. The first option will always be the selected country in Settings & tools > Currency & Tax Settings > Default country code
*body HTML & b@se tags Runs an array for each result

Data Tags (body)

Name Countries Field Example Description
[@country_code@] Country Code AU The code / ID for the country, in the case of Australia, the output would be AU
[@country_name@] Country Name Australia The name of the country

Was this article useful?

Be notified when this page is updated. Optional.