Utilities

This Smart Tags category consists of helper Smart Tags, such as retrieving the value of a cookie name or the visitor’s IP address or even crawling the DOM.

Returns the value of a cookie as stored in the visitor’s browser. Replace COOKIE_NAME with the name of the cookie.

{language.CONSTANT}

Returns the text of a language string. Replace CONSTANT with the language constant you want to return its text. For instance, to return the text of the language string COM_CONTACT_DETAILS, use {language.COM_CONTACT_DETAILS}.

{ip}

Returns the IP address of the visitor.

{referrer}

Returns the webpage URL where a person clicked a link that sent them to your site.

{randomid}

Returns an 8-character hexadecimal random ID. Example: 03bc431d0d605ce4.

{crawler}

Returns the value of a DOM element represented by a CSS selector. For instance, to get the div's text with a class “.phone”, use {crawler --selector=.phone}.

This Smart Tag supports the following functions:

  1. Return the text of a DOM element
    Syntax: {crawler --selector=selector [--fallback=value]}
  2. Return the HTML of a DOM element
    Syntax: {crawler.html --selector=selector [--fallback=value]}
  3. Return the Inner HTML of a DOM element
    Syntax: {crawler.html --selector=selector --innerhtml=true [--fallback=value]}
  4. Return the number of elements found
    {crawler.count --selector=selector [--fallback=value]}

Note: If this Smart Tag is called before the onAfterRender event and the given CSS selector represents elements in the module's output, no nodes are likely found because the module's output still needs to be rendered.

To learn more details about CSS Selectors, visit: https://www.w3schools.com/cssref/css_selectors.php

Last updated on May 7th 2025 09:05