K2 + module menu with the popup effect

Probably not once wondered how to add menu items to the module, which will be opened in a popup window – I did. Of course, the methods may be a few, but I chose the easiest solution.

K2 + module menu with the popup effect

The effect that I wanted to achieve was to the fact that the side menu added the two links from K2: Submit article and Moderate comments. Because by default they are opened in a popup window, I get a similar effect when you click on menu items.

  • You need, of course, to have prepared menu of links.
  • Then after its publication copy the contents of the source code of links, generally enough, from to tag
  • Now create an empty (custom) module.
  • In source mode paste the copied code, add if you want add some your own CSS style, which was attributed to the module menu to look exactly the same.
  • Next to those items that expected to opened in a popup window add the following code to tag <a>: target = "_blank" class = "modal" rel = "{handler: ‘iframe’, size: {x: 990 y: 650}}"
  • Note, if the item in the class already had something before, leave it, but before you add modal with separating space.
  • Now you can publish custom module, and remove the module from the original publication of the menu. It should work:), but if not check if the editor does not cut your modyfied code.

By they way, K2 version 2.5 beta for Joomla! 1.5 and 1.6 is ready to download and testing link.

Share
This article was first published June 27th, 2011