{module_urlcountrycode}

Description

This module outputs the 2 letter country code associated with the current domain.

Syntax

{module_urlcountrycode collection="my_custom_collection_name" template=""}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

This module can be rendered:

  • in plain text
  • using Liquid collections - this is the Liquid output tag you can use - my_custom_collection_name.countryCode

Examples

  • {module_urlcountrycode} - This will output US assuming the country set for your domain is "UNITED STATES" like so:  
  • {module_urlcountrycode collection="collection1" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection.
  • the country code is also contained in a Liquid global object. {{globals.site}} will output:
    {
      "id": 1576341,
      "name": "mtica4",
      "host": "mtica4.businesscatalyst.com",
      "countryCode": "US",
      "language": "US"
    }

Syntax

{module_urlcountrycode}

Examples

  • {module_urlcountrycode} - This will output US assuming the country set for your domain is "UNITED STATES" like so: