← Tags

Countries

This tag lets you loop through countries.

1{{ sc:countries }}
2 <option value="{{ iso }}">{{ name }}</option>
3{{ /sc:countries }}

When looping through, you may also loop through the country's related regions, like so:

1{{ sc:countries }}
2 <h2>{{ name }}</h2>
3 <ul>
4 {{ regions }}
5 <li>{{ name }}</li>
6 {{ /regions }}
7 </ul>
8{{ /sc:countries }}

Parameters

only

For example:

1{{ sc:countries only="GB|IE" }}

This will only return countries passed and in the order they are passed. It accepts a piped list of either iso values or country names.

exclude

For example:

1{{ sc:countries exclude="GB|IE" }}

This will exclude any countries passed from the list. It Accepts a piped list of either iso values or country names. This param has no effect when the only param is used.

common

For example:

1{{ sc:countries common="GB|IE" }}

This will creates a 'common' countries list above the rest of the country list, allowing you to make it eaiser to get to the most common countries your visitors select. It accepts a piped list of either iso values or country names. This param has no effect when the only param is used.