Page 1 of 1

Lightbox Content PopUp

Posted: Thu Feb 19, 2009 5:03 pm
by perspective
(Yes, I did search this)

I have yet to see a way where you can write content on joomla, and then have your menu item link to it creating a popup lightbox.

Has anyone done this?

For Example if I create a form, and I want it just to be in a lightbox pop-up, I don't want it to show all of the site as in a iframe with the design. I just want to show what is in the;

Code: Select all

<?php mosMainBody(); ?>
Any hints or clues?

Re: Lightbox Content PopUp

Posted: Mon Feb 23, 2009 5:33 pm
by perspective
So, out of so many joomla installs. No one has done this? =O

Re: Lightbox Content PopUp

Posted: Thu Jun 11, 2009 3:58 am
by corrado444
Actually, I did it cheating. Basicallly I created a menu, extracted the HTML, placed it in a HTML module and then added the jcepopu class to the <a> tag.
Works fine but of course it's not dynamic.

I'd think that going to the Joomla core wouldn't be hard to add a bit of code to lightbox it (there, it's a verb now)

Re: Lightbox Content PopUp

Posted: Thu Jun 11, 2009 1:07 pm
by perspective
very nice, thank you!

Re: Lightbox Content PopUp

Posted: Tue Sep 08, 2009 12:17 pm
by lightinthedark
Perhaps using "&tmpl=component" on the end of your url might help? This seems to strip off the site template and design etc and just give you the stylesheets and component content. Hope you find what you're looking for.

Re: Lightbox Content PopUp

Posted: Thu Sep 24, 2009 9:43 pm
by andpatton
I was looking for something similar and decided to try a silly workaround on a whim (I was sure it wouldn't work), and lo and behold! It works! So it is with pleasure that I present a super-simple, hack-free solution for creating menu items that open content in a lightbox and are still part of normal, dynamic joomla menus.

First, like corrado444, I use JCE Utilities for all my lightbox needs (highly recommended). So, I simply tried creating a Menu Item of type "external link", and then put in the path to the image I wanted to open in a lightbox in the 'Link' field (images/stories/your-image.jpg). I then put in the closing quote mark after the path, added a space, and then added class="jcebox (without the closing quote). Joomla then grabs that text and sticks it here: href="[link text goes here]".

So, put very simply, use this syntax for the Link field in your menu item:

Code: Select all

images/stories/your-image.jpg" class="jcebox
and Joomla will generate this html code for your link:

Code: Select all

<a href="images/stories/your-image.jpg" class="jcebox">
I still can't believe it works.

Re: Lightbox Content PopUp

Posted: Tue Dec 08, 2009 4:48 pm
by Devxstation
wow - nice tip!

Re: Lightbox Content PopUp

Posted: Tue Dec 29, 2009 6:55 pm
by evolve247
lightinthedark wrote:Perhaps using "&tmpl=component" on the end of your url might help? This seems to strip off the site template and design etc and just give you the stylesheets and component content. Hope you find what you're looking for.
Thanks for this! It solved My issue!

Re: Lightbox Content PopUp

Posted: Thu Mar 25, 2010 6:16 am
by daajestaa
andpatton wrote: So, put very simply, use this syntax for the Link field in your menu item:

Code: Select all

images/stories/your-image.jpg" class="jcebox
and Joomla will generate this html code for your link:

Code: Select all

<a href="images/stories/your-image.jpg" class="jcebox">
This is brilliant! I've been looking for a way to achieve this on a site for days now. I've tried all sorts of hacks and work-arounds but none worked. I can't believe how simple this solution is.

Awesome... thanks andpatton!!

Re: Lightbox Content PopUp

Posted: Fri Jun 04, 2010 2:37 pm
by jlvida
Hello All,
I am not a joomla or code guru, but have decent knowledge. I am attempting to make an article open in a lightbox .....when I "click" a checkbox within my shopping cart.

I have tried the "&tmpl=component" code within the "checkout.html.php" file, but I am not certain how to make all this work. I copied the article url in the same line, before the code but nothing happens.

Any ideas would be great. Thanks.

jl

Re: Lightbox Content PopUp

Posted: Fri Jun 04, 2010 8:46 pm
by andpatton
First of all, just so you know, this should probably be a new thread.

But anywho, if you want to attach that to an event like clicking on a checkbox in a shopping cart page (what component are you using, Virtuemart?), you'll need to use some JS. If you find the checkbox in the file you're looking at (if you are using VM, do you mean checkout.index.php?), a simple possibility would be to try something like:

Code: Select all

<input type="radio" onclick="jcepopup.open('http://www.yoursite.com/index.php?com=com_content&id=1&tmpl=component', 'Article title', 
'external_links', 'iframe', {width:800,height:600})"
That should work if you have JCE Mediabox (AKA JCE Utilities) installed on your site. I hope that works, and if you give more details, I could probably help you better.

Good luck

Re: Lightbox Content PopUp

Posted: Tue Jul 20, 2010 9:56 am
by tekknokrat
I see this threads solution is to add &tmpl=component in URL but I suspect this will work in Joomla 1.0.x . Any hint on get a similar result in Joomla 1.0.x?

Re: Lightbox Content PopUp

Posted: Wed Sep 08, 2010 6:32 pm
by Tatsu
andpatton wrote:
So, put very simply, use this syntax for the Link field in your menu item:
Code:
images/stories/your-image.jpg" class="jcebox

and Joomla will generate this html code for your link:
Code:
<a href="images/stories/your-image.jpg" class="jcebox">
Amazing solution! its so easy!

I used the same class method to get a text link from a custom module to create a pop up of an article. Is there anyway to adjust the pop up size?

Re: Lightbox Content PopUp

Posted: Wed Sep 08, 2010 7:00 pm
by andpatton
Is there anyway to adjust the pop up size?
Yup; taking the original example, just add rel="width[700];height[525];" after the path, where you replace 700 and 525 with the width and height (in pixels) you want. So in my example, it would look like this:

Code: Select all

images/stories/your-image.jpg" rel="width[700];height[525];" class="jcebox
Hope that's what you're looking for

Re: Lightbox Content PopUp

Posted: Thu Sep 09, 2010 3:37 am
by Tatsu
Thank you so much, does exactly as you said.

Re: Lightbox Content PopUp

Posted: Thu Oct 07, 2010 6:11 pm
by tomgartin
I'm running multiple sites on 1.5.20 and I've tried using Modalizer as well as JCE MediaBox, but neither has worked. I've input the given syntax in an External Link menu item such that it reads

Code: Select all

index.php?option=com_content&view=article&id=4&tmpl=component" class="modal
or

Code: Select all

index.php?option=com_content&view=article&id=4&tmpl=component" class="jcebox
but it's just not working.
Is there something I need to do in the template code to unlock this functionality?

Thanks

Re: Lightbox Content PopUp

Posted: Thu Oct 07, 2010 8:20 pm
by andpatton
tomgartin wrote:but it's just not working.
Is there something I need to do in the template code to unlock this functionality?
No, there's nothing you need to do in the template. What does happen when you use the method? Could you either link to an example or just copy the source code it creates (just of that menu item) and paste it here on the forum?

Re: Lightbox Content PopUp

Posted: Thu Oct 07, 2010 9:00 pm
by tomgartin
[/quote]No, there's nothing you need to do in the template. What does happen when you use the method? Could you either link to an example or just copy the source code it creates (just of that menu item) and paste it here on the forum?[/quote]

It goes to the page normally as if I hadn't added the extra code.

The website is http://www.mancaveonline.com
Go to "Video and Podcasts" on the menu bar and click on "Audio Library" (that's the only menu item I've put the modal code on so far)
If you click the blue button that says "Audio Library" you'll see that the

Code: Select all

<A HREF="website" CLASS="modal">
does work when it's in an article or module, just not as a menu item.

Re: Lightbox Content PopUp

Posted: Thu Oct 07, 2010 10:20 pm
by tomgartin
I must apologize, I had to take the code out of the menu item on the site I provided above. It was turning every link below it into a modal link to the audio library, effectively overriding the links to forms and blogs. Anyone else have that issue?

Re: Lightbox Content PopUp

Posted: Tue Oct 26, 2010 3:03 pm
by Strite
andpatton wrote:I was looking for something similar and decided to try a silly workaround on a whim (I was sure it wouldn't work), and lo and behold! It works! So it is with pleasure that I present a super-simple, hack-free solution for creating menu items that open content in a lightbox and are still part of normal, dynamic joomla menus.

First, like corrado444, I use JCE Utilities for all my lightbox needs (highly recommended). So, I simply tried creating a Menu Item of type "external link", and then put in the path to the image I wanted to open in a lightbox in the 'Link' field (images/stories/your-image.jpg). I then put in the closing quote mark after the path, added a space, and then added class="jcebox (without the closing quote). Joomla then grabs that text and sticks it here: href="[link text goes here]".

So, put very simply, use this syntax for the Link field in your menu item:

Code: Select all

images/stories/your-image.jpg" class="jcebox
and Joomla will generate this html code for your link:

Code: Select all

<a href="images/stories/your-image.jpg" class="jcebox">
I still can't believe it works.
You're a genius. I've been banging my head against a brick wall trying to do this for the past 2 days, i've had a major headache for 48 hours over this and you fixed my issue with a simple line of code! Haha. Originally I was trying to use the Rokbox and Roknavmenu plug-in from Rockettheme, which is supposed to do this out of the box. You've just saved me several more days of headaches with this solution :D

Re: Lightbox Content PopUp

Posted: Tue May 17, 2011 6:05 am
by ryanb
I'm having the same issue - can't get an Article to load as a popup.

Any solutions?

J! 1.5.22
Superfish menu

Re: Lightbox Content PopUp

Posted: Fri Sep 09, 2011 10:26 pm
by infyways
Lightbox Content Popup is now available on Joomla Extensions Directory. The articles can now be popped up in lightbox.

Check this : http://extensions.joomla.org/extensions ... ames/17938

Re: Lightbox Content PopUp

Posted: Mon Mar 12, 2012 3:09 pm
by fgcosoft

Re: Lightbox Content PopUp

Posted: Tue Nov 20, 2012 6:48 pm
by myjoomlauser
Hello all,

I'm having some issues to implement these solutions for a pop-up window in Joomla 2.5.
It seems that AndPatton's solution works great however I'm wondering if you can help me since I want to achieve something a little different.

I'd like that the pop-up window would open as soon as somebody would click on a menu item from the main nav, overlapping the rest of the content shown on that menu page by default.

Would anybody know how to do this, opening the pop-up linked with the menu item immediately after page loads??? Any advice would be greatly appreciated it.

Thanksss...

Re: Lightbox Content PopUp

Posted: Mon Feb 04, 2013 11:47 am
by Z3RatuL
Well this doesn't seem to work for me in Joomla 2.5.8. I have sef urls on and if I put this code

Code: Select all

/en/availability/?tmpl=component" class="modal
inside the link field at the external field type then the link displayed at the brower is:

/en/availability/?tmpl=component" class="modal and does nothing... Any other workaround?

Re: Lightbox Content PopUp

Posted: Fri Jun 05, 2015 2:48 pm
by azam100
lightinthedark wrote:Perhaps using "&tmpl=component" on the end of your url might help? This seems to strip off the site template and design etc and just give you the stylesheets and component content. Hope you find what you're looking for.

Thanks for this. :)

Re: Lightbox Content PopUp

Posted: Mon Jul 13, 2015 12:13 pm
by Hemali_123
In my website

1. I just simply want image popup on page load

2. Clicking on that image popup jump on other page.

I have already installed plg_jcemediabox_1122_joomla25 & com_jce_252 .
I can’t understand how to use both of these to get desired result.