Skip to content
  1. Extras
  2. ClickToCall

ClickToCall

Call widget for mobile devices.

Features

  • Shows the widget only to mobile users (uses mobile-detect.js).
  • Flexible schedule: set display time per day.
  • You can disable the built-in mobile-detect.js if you already use it on the site.
  • Custom JS/CSS files are supported.

Component settings

Component settings

ClickToCall snippet parameters

NameDefaultDescription
&force0Force the widget to show.
&phonePhone number for the widget; if empty, taken from system settings.
&tplClickToCall.tplChunk for the widget.
&useCustomCss0Disable component CSS (use your own styles).
&useCustomJs0Disable component JS (use your own scripts).

System settings

NameDefaultDescription
clicktocall_mobiledetectYesUse mobile-detect.js. Disable if you already use it on the site.
clicktocall_phoneDefault phone for the widget.

The snippet must be called uncached!

Usage examples

To force the widget to show, use &force:

modx
[[!ClickToCall? &force=`1`]]

The widget will then always show, ignoring the schedule.

To use different phone numbers on different pages:

modx
[[!ClickToCall? &phone=`+79991234567`]]

Widget appearance

Widget appearance