Follow Herdboy.com

Articles in Shadowbox

How To Load an Article/Plugin or Module in the Shadowbox


There may come a time when you need to have a text link or image link open up an article in your Shadowbox/Lightbox. If you have a module inserted in an article using the Joomla loaposition plugin or a plugin like the YOOtheme YOOgallery plugin, you can also get these to display in the Shadowbox without having the rest of the page also showing.

You know already how to get an internal or external web page to display in the Shadowbox, but the major problem is that the menus, modules and other content also end up displaying in the Shadowbox.

In this tutorial I am going to show you how I open up an existing article from this site in the Shadowbox.  The article in question has some text and the YOOtheme YOOcarousel module loaded in it ( in fact that article is a tutorial on how to load modules into articles in Joomla 1.5 ).

We start of by establishing the url for that article, which in this case is http://www.herdboy.com/index.php?option=com_content&view=article&id=111&Itemid=156 . The only part of this url that we are going to need is index.php?option=com_content&view=article&id=111&Itemid=156 .

This is the sample code that we need for this to work, Ignore text in ALL CAPS
Opening up a page in the Shadowbox Please inpsect the code with Firebug Note the part of the url that we are using . I have changed the index.php of the url to index2.php ( this is the secret, so we do not get the menus, other modules etc... showing up).

Notice from the sample code that this article will be launched when the visitor clicks on an image, just like in this button below.

 

I hope you found this tutorial simple to follow, because thats our wish to and aim, an easy to follow guide with no fancy technical terms to confuse you.

What's that I hear you say ? You want to drop a small donation to support the tutorials, no problem, just click here
Comments (7)add comment

David Kartuzinski said:

0
Great
I am currently building a site and needed the registration to be in a shadow box. Bravo! This was the ticket. Thanks.
-DK
 
February 17, 2010
Votes: +0

Sansel said:

0
Thanks alot
Herd boy thank you very very much, you are wonderful
 
October 25, 2009
Votes: +0

mustaq said:

mustaq
...
@ Jelger

Thanks for the feedback. Yes it is not correct as it is viewed.

You should not have the problem with the semi colon if you copied and pasted the code sample at it would normally have been stripped out.

Here is another example;


Opening up a page in the Shadowbox
 
May 08, 2009
Votes: +1

Jelger said:

0
Semicolon?
Thanks for the tutorial. Nice function! Really like it.

But I believe there's a small error in your sample code: ...&Itemid=156";class="option"... I have to remove that semicolon, I guess?
 
May 08, 2009
Votes: +1

stephan said:

0
super
thank you very much for your professionel and free tutorials
 
December 07, 2008 | url
Votes: +2

herdboy said:

herdboy
You are Welcome
glad to be of service
 
November 23, 2008
Votes: +5

Nicole said:

0
Thanks!
That simple, clear and it works perfectly!

Thank you very much for these post!
 
November 23, 2008 | url
Votes: +4

Write comment

busy