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