Summary: create a modal popup iframe with dynamic content
Version: 2018-03-22
Prerequisites: pmwiki 2
Status: stable
Maintainer: Ccox
Categories: Links
Discussion: PopupIFrame-Talk

Questions answered by this recipe

How can I create modal dialog containing an iframe with dynamically changeable popup content for the source?

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.


This recipe creates a modal popup dialog tied to a special link where the link content is what gets displayed in the iframe popup.


Download popupiframe.phpΔ, copy to in cookbook directory and install by adding to local customisation file:


This recipe requires javascript.

You will also need to add the content of popupiframe.cssΔ to your skins css or preferabley, your pub/css/local.css file.

This adds two markups. A parameterless required markup called (:popiframe:) and a modified link using the markup %popiframe <parameters>%[[<link>]].


 %popiframe name=mytarget%[[https://www.youtube.com/embed/omha5zJkAGM|Tux Racer]]
 %popiframe name=mytarget2%[[PmWiki.PmWiki?skin=null]]

The name=mytarget creats a target of #mytarget for the href. Without that parm all links will simply use # as the target which means if you click on one, they will all show up as followed.


 %popiframe name=mytarget%[[https://www.youtube.com/embed/omha5zJkAGM|Tux Racer]]
 %popiframe name=mytarget2%[[PmWiki.PmWiki?skin=null]]

For display wiki interior pages, I recommend to install a null skin null.zipΔ and installing and enabling the SkinChange recipe and make interior links use the null skin.


Change log / Release notes

  • 2016-05-30: Initial release.
  • 2018-03-22: Updates from Petko for new Markup php 7 compatability


See discussion at PopupIFrame-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.