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.
Set as favorite
Bookmark
Email this
Hits: 14605
Comments (7)

David Kartuzinski
said:
|
Great I am currently building a site and needed the registration to be in a shadow box. Bravo! This was the ticket. Thanks. -DK |
|
mustaq
said:
|
... @ 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 |
|
Jelger
said:
|
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? |
|
Write comment





