Summary: Useful Trick for adding anything you can do with a web-page to your wiki-pages (Forms, SQL-lookup, Multi-Media, IP-camera... whatever you can think of)
Version: N/A
Prerequisites: includeSite
Maintainer: Kirk Siqveland
License: (Apache 2.0|BSD-3-clause|BSD-2-clause|GPL|LGPL|MIT|MPL-2.0|CDDL-1.0|EPL-1.0) - OpenSourceLicenses Cookbook:Cookbook Licenses
Users: (view? / edit)
Discussion: EmbedMore-Talk?

Questions answered by this recipe

How can I add (.whatever.) that I can do with a normal web-page, but as part of my PMWiki site?

"Whatever" might include Java, Javascript, SQL, PHP, HTML, XML, Web-Applications, Calendars, Tables, Forms, pretty much anything you can do on the web...

All sections are optional, you can remove those that do not apply to your recipe, and add new ones.


Ok, this is really just a specific application of an existing tool:

Use the includeSite recipe to allow non-PMWiki pages to be embedded into your PMWiki pages.

Sound too obvious?
Well, then you're brighter than me!

If you build a simple page with whatever functions you want, in your domain or not... you can use includeSite to embed it into the body of your PMWiki-page.

Just keep your to-be-embedded page simple, leaving out what you know will be provided by the PMWiki page (Headers, Navigation, SideBar, etc.) and then use (:includeSite:) to embed it into your wiki page!


I struggled with the various recipes for incorporating SQL into a page, and eventually got SelectQuery working, but then I was building a demo user-interface to be sure it worked before I tried to embed it, and suddenly realized... all I needed to do was use (:includeSite:) since I already had everything working! Now it works seamlessly inside my PMWiki! In fact, since the embedded pages include links of their own, those pages transition seamlessly within my single PMWiki page, giving me a dynamic user-interface, without having to mix my PMWiki code with my SQL/PHP/JS code.

The idea started with the need to build some PHP/MySQL C.R.U.D Forms (Create, Read, Update, Delete) for Data-Entry, but I wanted to have them in a PMWiki site for rapid Content Management and User Interface development. Once I figured this trick out, I realized how easy it would be to do many other sorts of embedded projects, so I thought I'd share it here, where other folks could find it, feel free to add your application of the idea to this page or to the EmbedMore-Talk? page.

By The Way:
I first learned to use includeSite in order to embed wikipedia pages into a website. Turns, out with a little web-magic you can do that quite nicely!:

For example I used the following code to embed an article on the Airships, being sure that it shows up properly credited as a Wikipedia page:

 https://en.wikipedia.org/static/images/project-logos/enwiki.png"Wikipedia Logo" | - %newwin% [[ Wikipedia:R33-class_airship |    Full Wikipedia Page - ]]

(:includeSite https://en.wikipedia.org/wiki/R33-class_airship?printable=yes :)

(That last forced line break seems to be necessary sometimes to get the element, e.g. "<div>" to expand to include the embedded page.)

Notice the trick I used here to get a clean embed: the page URL includes the ending "?printable=yes" for Wikipedia pages, this strips away the rest of the page decoration (Navigation, Logo, SideBar etc.) leaving just the content.

If you are making your own pages to embed you won't need that (or probably even be able to use it.)


  • Just follow the installation instructions for includeSite.
  • Build your special function as a stand-alone page with matching colors and style to your PMWiki-site. Don't put these pages in your pmwiki directory!
  • Make a new PMWiki page.
  • Edit the page to have whatever text you want before the embedded page.
  • add the includeSite markup - say, something like: (:includeSite https://mydomain.org/notmypmwiki/pagetoembed.html width="98%" :)
  • add whatever text you want below the embedded page
  • Save and
  • enjoy!


No special configuration beyond the includeSite recipe!


The following strings can be translated in an XLPage:



To do / some day / maybe

If you have future plans or wishes for this recipe.

Change log / Release notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also



See discussion at EmbedMore-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.