Change log

domain_settings

This module component retrieves settings associated with the current domain, or optionally from another specified domain configured in the site instance.

This component can be output throughout all site content areas and emails with the retrieved settings including things like the domain's default landing page, country, culture and currency attributes.

{% component type: "domain_settings" %}

Parameters and Options

Parameter
Values
Required
Description
type
domain_settings

This is the name of the entity that needs to be used for the component retrieving function.

domain
<YOURDOMAIN.COM>

Specify any additional saved domain for the site to access its domain settings.

Leaving out this parameter, or leaving the value empty, will result in the current domain used as default.

collectionVariable
<yourLiquidVariableName>

Assigns the data to a Liquid collection enabling further access to the data on the Page or Template using Liquid.

Your collectionVariable value must only contain English letters, numbers or underscores. Spaces or special characters are not supported.

Liquid Output

The below example shows the domain settings available for the site. The Liquid data output from this example would look like the following (for example, when using a collectionVariable to create the collection):

{
  "Domain": "docs.treepl.co",
  "Country": {
    "Name": "UNITED STATES",
    "Code": "US"
  },
  "LandingPage": {
    "Id": 1865,
    "Url": "/documentation",
    "Name": "Documentation"
  },
  "FormatSetting": {
    "Id": "2230",
    "Name": "Default",
    "Culture": "en-US",
    "DecimalsQuantity": 2,
    "Currency": {
      "Code": "USD",
      "Symbol": "$",
      "DigitalCode": "840",
      "Name": "US Dollar"
    }
  },
  "Params": {
    "type": "domain_settings",
    "collectionvariable": "domainCollection"
  }
}

The data exposed is explained further in the table below:

Name
Description
Domain
The domain name being referenced for the retrieved settings.
Country.Name
Standard name of the domain’s applied country.
Country.Code
Standard 2 letter code of the domain’s applied country.
LandingPage.Id
System ID of the domain’s applied landing page.
LandingPage.Url
URL of the domain’s applied landing page.
LandingPage.Name
Item name of the domain’s applied landing page.
FormatSetting.Id
System ID of the domain’s applied Culture & Currency settings.
FormatSetting.Name
Descriptive name (from the admin) of the domain’s applied Culture & Currency settings.
FormatSetting.Culture
Standard culture/country code of the domain’s applied culture.
FormatSetting.DecimalsQuantity
Number of digits to display for decimal numbers.
FormatSetting.Currency.Code
Standard currency code of the domain’s applied currency.
FormatSetting.Currency.Symbol
Standard currency symbol of the domain’s applied currency.
FormatSetting.Currency.DigitalCode
Standard currency digital code of the domain’s applied currency.
FormatSetting.Currency.Name
Standard descriptive name of the domain’s applied currency.

Accessing the Data

JSON Output

You can output the full JSON for your component data by referencing the root Liquid object {{this}} in your module’s layouts, or directly on your page, if using the collectionVariable parameter in your component tag.

For example:

{% component type: ... collectionVariable: "myData" %}

You can then render the JSON like so:

{{myData}}

For more details on using this approach, see Part 2 of the free ‘Learning Liquid Course’.

Rendering Property Values

There is no default or virtual layout for this component. It is purely a data object for Liquid usage.

This data is accessible directly on the Page or Template via a Liquid Collection by adding collectionVariable to the Component.

An example using collectionVariable with value "domainCollection" for the current domain:

{% component type: "domain_settings", collectionVariable: "domainCollection" %}

Accessing a specific item within the collection. In this case the currency name, which in our example would render the value US Dollar

{{domainCollection.FormatSetting.Currency.Name}}


Related Articles

  • Domains
    The Treepl CMS Domain settings allow you to control default domain, landing pages, domain authentication for system emails along with country and cultural settings like number and currency formatting.
  • Payment Settings
    Integrate various payment gateways, for multiple countries and currencies, into Treepl CMS for form payments, subscriptions and eCommerce workflows.
  • Orders
    Orders store accounts of any payments made via the website and provide management for additional payments, invoices, order statuses, tracking info, the products purchased within the order and the details of the form submission used to take the order.
  • Advanced CRM Groups
    Advanced CRM Groups allow you to extend the data fields within multiple areas of the CRM, either globally or on a per-record basis.
  • {{ order }} object
    This liquid object will output the order details of a submitted payment. ...
  • module (Catalogs)
    This module component fetches data relating to eCommerce Catalogs and can be used to render Catalog structures and Products within them.
  • module (Products)
    This module component fetches data relating to eCommerce Products and can be used to render Product information.
  • ecommerce_add_to_cart
    This component renders an anchor element allowing the javascript function to add the item to the shopping cart.
  • ecommerce_buy_now
    This component renders an anchor element allowing the javascript function to add the item to the shopping cart and then proceeding directly to the shopping cart page.
  • ecommerce_item_quantity
    This component renders a form input element allowing a quantity to be set for when the source item is added to the shopping cart.
  • item_attributes
    This component fetches all attributes/options for a specified product. By default, each attribute group is rendered, with its options and any prices, according to their specified form inputs.
  • related_items
    This component fetches related items of a specific source item, such as a Product that has had Related Products assign to it.
  • grouped_items
    This component fetches grouped items of a specific source item, such as a Product that has been Grouped with other Products and allows the ability to navigate between grouped items.
  • currencies
    This component renders a form select element of all currency names, codes and symbols by default, and can also be used to output currency data to a Liquid collection.
  • shopping_cart
    This component fetches data relating to the shopping cart, such as any products added, order totals, tax, shipping, etc.
  • shipping_options
    This component renders a form select element of all shipping options configured on the site, and can also be used to output shipping option data to a Liquid collection.
  • shippingProviderFields
    This component provides a placeholder for populating additional Shipping Provider options to the user.
  • tax_codes
    This component renders a form select element of all tax codes configured on the site, and can also be used to output tax code data to a Liquid collection.
  • payment_form_fields
    This component is used to render payment fields, and payment related validation errors, within a form using the capabilities provided by your configured payment gateway.
  • orders
    This component fetches Orders from the CRM, either owned by the logged-in user or for all customer Orders.
  • Getting Started
    To get started with the eCommerce module there are some overall settings to configure that provide eCommerce with further context in order to function appropriately for your situation.
  • Products
    Products are one of the most powerful and flexible modules in Treepl CMS. Create customised product schemas with multiple price points, catalogs, inventory tracked attributes/variables, SEO optimisation and more.
  • Catalogs
    When organising any eCommerce store, Catalogs are crucial to your Products structure and browserbility. Easily create and customise unlimited product catalogs for your online store.
  • Discount codes
    Provide discount code functionality for your Treepl CMS shopping cart. Ideal for promotions, customer loyalty and conversions or to help move more stock.
  • Gift vouchers
    Gift vouchers can be issued to your customers or purchased by them online via the shopping cart.
  • Taxes
    Create any number of required tax codes specific to the shipping country selected in your Treepl CMS shopping cart.
  • countries
    This component renders a form select element of all country names and country codes by default, and can also be used to output country codes/names to a Liquid collection.
  • Shipping Options
    Treepl CMS provides the ability to configure both custom shipping options and integrated shipping providers based on a variety of conditions during the shopping cart stage.
  • Settings
    These various eCommerce settings allow you to further control and customise the way your website functions, both in the admin and on the front-end, in terms of eCommerce functionality.
  • eCommerce Javascript
    This is the provided javascript options for further controlling/customising the ecommerce javascript provided by the CMS.
  • Abandoned Cart Recovery
  • CRM Orders
    Return or update Order item/s via the public API endpoint.
  • Migrating to Advanced Payment Flow
    This article describes differences and possible required actions for migrating to the Advanced Payment Gateway flow.

External Resources

There are currently no external resources available.

Please let us know if you have any other contributions or know of any helpful resources you'd like to see added here.


Questions?

We are always happy to help with any questions you may have.
Visit the Treepl Forum for community support and to search previously asked questions or send us a message at support@treepl.co and we will consult you as soon as possible.