Skip to main content

Country

Country loop lists countries.
{loop type="country" name="the-loop-name" [argument="value"], [...]}

Arguments

ArgumentDescriptionDefaultExample
areaA single or a list of area ids.area="10,9", area: "500"
excludeA single or a list of country ids to exclude from the results.exclude="2", exclude="1,4,7"
exclude_areaA single or list of area IDs. Countries which belongs to these areas are excluded from the resultsexclude_area="7", exclude_area="3,102,14"
has_statesA boolean value to return countries that have states or not (possible values : yes, no or *).*has_states="no"
idA single or a list of country ids.id="2", id="1,4,7"
langA lang idlang="1"
orderA list of values see sorting possible valuesidorder="alpha_reverse"
visibleA boolean value to return visible or not visible countries (possible values : yes, no or *).yesvisible="no"
with_areaA boolean value to return either countries whose area is defined either all the others.with_area="true"

Plus the global arguments

Outputs

VariableValue
$AREAthe area the country belongs
$CHAPOthe country chapo
$DESCRIPTIONthe country description
$HAS_STATES1 if the country has states, 0 otherwise
$IDthe country id
$ISOALPHA2the ISO 2 characters country code
$ISOALPHA3the ISO 3 characters country code
$ISOCODEthe ISO numeric country code
$IS_DEFAULT1 if the country is the default one, 0 otherwise
$IS_SHOP_COUNTRY1 if the country is the shop country, 0 otherwise
$IS_TRANSLATEDcheck if the country is translated
$LOCALEThe locale used for this research
$NEED_ZIP_CODE1 if the country needs a zip code for address, 0 otherwise
$POSTSCRIPTUMthe country postscriptum
$TITLEthe country title
$VISIBLEtrue if the country is visible. False otherwise
$ZIP_CODE_FORMATThe format of the zip code for this country where N is a digit, L a letter and C a state ISO code.

Plus the global outputs

Order possible values

Arguments

Ascending valueDescending valueSorted fields
alphaalpha-reversetitle
idid_reverseid
randomcountries in pseudo-random order
visiblevisible_reversevisibility