JHTML::_('behavior.modal', $selector, $arrayparams)
/joomla/html/html/behavior.php ( line 117 )
Note: This is the basic import. If someone more know the adicional params, please email me.
The code below illustrates how to call an external site to open in a lightboxCode:
The code below illustrates how to receive data from a view called the lightbox - Good for complex popups
On the same file, add this form com_wedmodal/views/wedmodals/tmpl/default.php:
Ok. Now you have the basic main page to receive the data. But as you see on heref of the link on last code, you will need call one task from the controller. Lets put code of the task mypopuptask on com_wedmodal/controllers/popup.php:
On last controller code, you will call one Model 'popup' that in this example no do not have some special code. Just add one empty model with the class WedmodalsModelPopup for do not have errors.
Also, on com_wedmodal/views/popup/view.html.php do not need any special code, just add like any other view.html.php
Finaly, we will set what will appear on com_wedmodal/views/popup/tmpl/default.php, the real content that you will see when click on link of this fist code of this example:As you see, this is just one link with same amount of variables that we have to receive on com_wedmodal/views/wedmodals/tmpl/default.php. Is really important that you pay atention on all these steps, and also download the code with the working example for do not lose time.
This is a simple example, but have sure that you can do thinks really interesting, like call one view with a long list of articles and when you click on article the link give back to the page the ID of that article.