Joomla 2.5.x and Joomla 3.x has built in bundle of light box popup. You don’t need to install any 3rd party extensions for light box popup. You can use existing joomla light box popup feature for both joomla 2.x and Joomla 3.x site.

You can display any image, iframe site, iframe video, iframe form etc through joomla 2.5.x and joomla 3.x built in light box feature. Let’s learn how to do that.

Go to your default template’s index.php file. Put the below code in between <head></head> section.

<?php JHTML::_('behavior.modal'); ?>

Once you call modal now you will have to do the below task for light box image and light box iframe.

Light Box Image

<a class="modal" href="http://www.yoursite.com/sample.jpg">Click Here for Light Box Image</a>

Light Box Iframe

<a class="modal" href="http://www.yoursite.com/sample-page.html" rel="{handler: 'iframe', size: {x: 600, y: 300}}">Click Here for Light Box Iframe</a>

In this way you can show any content, by adding class=”modal” and rel="{handler: 'iframe', size: {x: 600, y: 300}}" styles.

If you need to display output of Joomla component in an article, you need to add ?tmpl=component to the link href.

<a class="modal" href="http://www.yoursite.com/sample-page.html?tmpl=component" rel="{handler: 'iframe', size: {x: 600, y: 300}}">Click Here for Light Box Iframe</a>

Hope this will help you to use existing joomla 2.5.x and Joomla 3.x light box feature without using 3rd party light box extensions.

Comments  

+1 #3 gehlot 2016-06-11 10:44
Very Help Ful
Quote
0 #2 Help 2015-06-16 14:58
Quoting JeraWeb:
Try to do so, but it doesn't work. Should it be a part of a bootstrap? Or some plugin nedd to be turned on?

Please, answer, it' very interesting


You don't need to enable any plugin for that. All you will have to do is put in between tag and call Click Here for Light Box Image this into your article. That is all. It should work.
Quote
+1 #1 JeraWeb 2015-05-21 21:52
Try to do so, but it doesn't work. Should it be a part of a bootstrap? Or some plugin nedd to be turned on?

Please, answer, it' very interesting
Quote

Add comment


Security code
Refresh