Skip to main content

State

State loop lists states.
{loop type="state" name="the-loop-name" [argument="value"], [...]}

Arguments

ArgumentDescriptionDefaultExample
countryA single or a list of country ids.country="10,9", country: "500"
excludeA single or a list of state ids to exclude from the results.exclude="2", exclude="1,4,7"
idA single or a list of state 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 states (possible values : yes, no or *).yesvisible="no"

Plus the global arguments

Outputs

VariableValue
$COUNTRYthe country the state belongs
$IDthe state id
$ISOCODEthe state ISO code
$IS_TRANSLATEDcheck if the state is translated
$LOCALEThe locale used for this research
$TITLEthe state title
$VISIBLEtrue if the state is visible. False otherwise

Plus the global outputs

Order possible values

Arguments

Ascending valueDescending valueSorted fields
alphaalpha_reversetitle
idid_reverseid
randompseudo-random order
visiblevisible_reversevisibility