4

There are lots of links in CiviCRM which will: (a) open an overlaid modal dialog when clicked, and (b) open the same content in a new page when Ctrl+clicked or middle-clicked. This is cool and I want to make one link which does this.

I see here that pages can enable this behavior for all links within the page by extending CRM_Core_Page and setting public $useLivePageJS = FALSE;. Neat, but not quite what I want.

I'm building an extension where I want to achieve the same result, but for one link which would live at the top level of the CiviCRM menu. Is there a class I can add somewhere, or a javascript function I can call somehow that will enable this "modal" functionality for one link?

1 Answer 1

5

It's quite simple actually. Add the css class crm-popup to the link and you're done :)

1
  • That's pretty great!!
    – Aiden
    Oct 3, 2020 at 11:49

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.