Skip to content

Configuration

The <commentix-widget> HTML element accepts various attributes to configure the widget. See the list below for the complete reference.

language

By default, the widget uses the language specified in the lang attribute on the document's <html> element.

<!doctype html>
<html lang="en">
...
</html>

If this attribute is not set or contains an unsupported language, it falls back to en.

Supported languages:

You can set the language attribute to one of the following language codes:

  • cz (Czech)
  • da (Danish)
  • de (German)
  • el (Greek)
  • en (English)
  • es (Spanish)
  • es-419 (Spanish Latin America)
  • fi (Finnish)
  • fr (French)
  • hu (Hungarian)
  • it (Italian)
  • nl (Dutch)
  • no (Norwegian)
  • pl (Polish)
  • pt (Portuguese)
  • pt-BR (Portuguese Brasil)
  • ro (Romanian)
  • ru (Russian)
  • sv (Swedish)
  • tr (Turkish)
  • uk (Ukrainian)

Example:

<commentix-widget site="{{ SITE_ID }}" language="de"></commentix-widget>

maxLevels

This attribute sets the maximum number of nested comment replies. Restricting thread depth ensures conversations remain readable and accessible, particularly on mobile devices. Once the limit is reached, the Reply button is automatically hidden to prevent further nesting.

The default value of maxLevels is 3.

Example:

<commentix-widget site="{{ SITE_ID }}" maxLevels="2"></commentix-widget>

noCount

Set this attribute if you want to hide the number of comments next to the comment section title.

Example:

<commentix-widget site="{{ SITE_ID }}" noCount></commentix-widget>

noRating

If you do not want users to be able to like comments, you can disable rating with this attribute.

Example:

<commentix-widget site="{{ SITE_ID }}" noRating></commentix-widget>

page

To include accurate links in reply notification emails, the widget must transmit the parent page's URL to the backend. By default, the widget captures the current browser location, automatically stripping any query parameters or fragments (e.g., ?id=123 or #section).

For example, https://www.example.com/blog/article.html?id=value#some-anchor becomes https://www.example.com/blog/article.html.

If the default detection is unsuitable for your use case, you can set this attribute to a canonical URL of your choice.

Example:

<commentix-widget site="{{ SITE_ID }}" page="https://www.example.com/blog/article.html?id=123"></commentix-widget>

sort

You can use this attribute to set the sort order of comments. Possible values are:

  • best
  • latest
  • oldest

The default value is best.

Example:

<commentix-widget site="{{ SITE_ID }}" sort="latest"></commentix-widget>

thread

All comments on your site are grouped in threads, and each thread belongs to a single page. By default, the widget uses the pathname of the current browser location as the unique identifier of the thread. For example, if the widget is embedded on https://www.example.com/en/blog/some-article.html?param=value, the thread ID will be /en/blog/some-article.html.

This works out of the box in most cases. However, this default behavior might cause problems in the following cases:

  1. When the pathname changes, existing comments will not show up on the new address.
  2. On multilingual websites where the current language is not part of the pathname, the widget will show comments from all languages.
  3. Your backend uses custom IDs to identify pages or blog posts that are not part of the pathname (e.g. /blog/article?id=123).
  4. Different URLs pointing to the same page.

In those cases, it is highly recommended to set the thread attribute to a custom thread ID.

Example:

<commentix-widget site="{{ SITE_ID }}" thread="123-en"></commentix-widget>

visibleComments

This attribute determines the number of root comments shown by default before showing the Show all comments button.

The default value is 5.

Example:

<commentix-widget site="{{ SITE_ID }}" visibleComments="10"></commentix-widget>

visibleLevels

Replies to comments are collapsed by default. You can use this attribute to show replies up to a certain level (depth).

The default value is 1.

Example:

<commentix-widget site="{{ SITE_ID }}" visibleLevels="2"></commentix-widget>