I have created a custom backend button (JToolbarHelper::custom()), when a user clicks the button it shows a popup window with some content. How can I do so, not using JToolbarHelper::preview() as this button will do more than just displaying the content. Is there some inbuilt library function to do so?

2 Answers 2


Popup windows are part of core Joomla. What you need to do to activate functionality is:


"a.popuplink" can be replaced by any jQuery selector. Script used by Joomla is squeezbox. Also 3+ versions of Joomla you can use bootstrap modals, but it will be a little bit mode complicated.

Full example:

anywhere in your view put

<a class="btn popuplink" href="http://joomla.stackexchange.com/posts/17068">Link that opens up popup styled like button</a>
  • it would be helpful if you can provide an example too. I am new to joomla and hence a more detailed explanation would be great :) Commented Jul 6, 2016 at 3:02
  • I'd say that it's to simple for explanation, but I've tried and added the example. Really all you need is past the <?php JHtml::_('behavior.modal','a.popuplink'); ?> and all your links (<a> tags) having class "popuplink" would open in popup.
    – Alexandr
    Commented Jul 6, 2016 at 6:30
  • will try this and ping you again for help :) thanks Commented Jul 7, 2016 at 16:15
  • @NikitaDhiman you're welcome
    – Alexandr
    Commented Jul 7, 2016 at 16:18

The popup windows are not part of core Joomla. You need some javascript for this, like jQuery or mootools, or a single JavaScript file with the function defined in there.

Since you can't be sure which backend template is used you have to bring your popup code with you.

So: no, there is no inbuild library function (afaik).


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.