Skip to content
  1. Extras
  2. ClickToCall

ClickToCall

The call widget for mobile devices.

Features

  • Widget show only for mobile device users (use mobile-detect.js to detect mobile).
  • Flexible configuration of the widget display time for each day.
  • You may to turn off using mobile-detect library in system settings.
  • You can use your own JS/CSS files.

Component settings

ClickToCall snippet parameter

NameDefaultDescription
&force0Forced widget call
&phonePhone number for widget, if not specified system setting clicktocall_phone will be used
&tplClickToCall.tplWidget's chunk
&useCustomCss0Turn off default CSS.
&useCustomJs0Turn off default JS.

Note: If you turn off default CSS and JS you need manually write your own JS and CSS for widget

System settings

NameDefaultDescription
clicktocall_mobiledetectYesUse mobile-detect.js?. If you are already use mobile-detect.js on your site, turn it off.
clicktocall_phoneDefault phone for widget

NOTE: Snippet must be called non-cached!

Examples

For forced widget's call use &force parameter:

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

In this case snippet will ignore time frames.

If you want to show different phones one your pages you can use:

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

Result