0

I have Tawkto module installed, and I want to create link on my main menu for:

"Live Chat"

The link is:

  <a href="javascript:void(Tawk_API.toggle())"> Click to Chat </a>

Now this works fine on static HTML pages, but when I paste it in field for main menu, it doesn't work.

I've tried:

 /javascript:void(Tawk_API.toggle())

And:

 javascript:void(Tawk_API.toggle())

How can I do this?

The site with Livechat is:

www.vuxi.com

1
  • You can try implementing theme_menu_link hook in your theme's template.php file and replace the link for your menu. You can implement hook using [THEME_NAME]_menu_link function name.
    – Yogesh
    Commented Jul 29, 2016 at 5:56

1 Answer 1

0

You can easily achieve this by using Void Menu module.

  1. Download & Install Void Menu module.
  2. Go to http://www.yoursite.com/admin/config/user-interface/void_menu
  3. Set javascript:void(Tawk_API.toggle()) as value for HTML value for <void2>
  4. Then go to main menu configuration and set menu Path as <void2>
1
  • Yep, that works perfectly ;) Commented Jul 29, 2016 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.