{module_sitehost}

Description

Displays the host section of the URL.

Syntax

{module_sitehost 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.siteHost

Examples

  • {module_sitehost} - if this module is used on the URL of http://mysite.com/_blog/my_blog then this module will output http://mysite.com
  • {module_sitehost collection="collection1" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection.
  • the site hostname is also contained in a Liquid global object. {{globals.site}} will output:
    {
      "id": 1576341,
      "name": "mtica4",
      "host": "mtica4.businesscatalyst.com",
      "countryCode": "US",
      "language": "US"
    }

If this module is used on a secure URL, then the module will output the host of the non-secure URL the user navigated from. For example, if this module is used on https://mysite.worldsecuresystems.com and the customer navigated to this URL from http://mysite.com then this module will output http://mysite.com. If the user started on the secure URL (i.e did not navigate from a non-secure URL of the site), then this module will use the default domain name of the site.

Syntax

{module_sitehost}

Examples

  • {module_sitehost} - if this module is used on the URL of http://mysite.com/_blog/my_blog then this module will output http://mysite.com

If this module is used on a secure URL, then the module will output the host of the non-secure URL the user navigated from. For example, if this module is used on https://mysite.worldsecuresystems.com and the customer navigated to this URL from http://mysite.com then this module will output http://mysite.com. If the user started on the secure URL (i.e did not navigate from a non-secure URL of the site), then this module will use the default domain name of the site.