Summary: Talk page for IncludeUrl.
Users: +2 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Keep in mind that most things served up by a browser aren't designed to be included by other pages -- i.e., they have extra <html>, <head>, <title>, <body>, etc. tags in them that will probably not display correctly when embedded in another page. This recipe makes no attempt to remove the extra information.

Is it possible to make a link that opens in the frame, or included url?

If a link to an anchor at the bottom of the page could be made to work on framed content, that would make it really easy to reference matter in the framed page. I'm writing quizzes to build a quiz database for Wikipedia pages, and the questions are based upon the essays. If I could hyperlink a part of a question to an anchor in a framed topic page; wow, that would really make it easy for the quiz-taker. Please help.

You should be able to add a "name=myframe" attribute to the frame, and then a "target=myframe" attribute to the links, see below. --Petko

(:includeurl https://... name=frame1 :)

%target=frame1% [[Some page| Link opens in the above frame]] %%

%target=frame1% [[Other page| Also opens in the above frame]] %%

IncludeUrl not working in IE / changed "object" to "iframe"

It doesn't work yet! s. Re: IncludeUrl not working with IE or Netscape?. Perhaps it's because of a object tag vulnerability in IE and/or a security fix, cause other object types are working in IE, e.g. SVG-objects or IE doesn't support the object types text/html.

For this reason and becaus in the IncludeUrl cookbook is hard coded type="text/html" - so you can't anyway use this markup for other things like html - I have replaced <object> with <iframe> and now it works in IE too: includeurl_by-iframe.phpΔ

Has somebody any reasons to do this not?

cg, 2006-08-01

Seems reasonable, but IFRAME is not supported any longer from XHTML 1.1. - I changed the hard-coded type="twext/html" to be optionally set within the markup in includeurl.phpΔ, for those who like to experiment with othe robject types. HansB August 02, 2006, at 03:41 AM

I changed includeurl.php so that it will now use the <iframe> tag if the option iframe=1 or iframe=true is specified in the markup. HansB August 03, 2006, at 03:58 AM

Broken in Pmwiki v2.2.1?

I just upgraded my site from v2.1.27, and now the width, height, & border attributes in (:includeurl:)don't seem to work any more. I'm using the skittlish skin, but also tried reverting to the default skin with no success.

dg, 2009-04-17

Mimick old IncludeUrl script [**]

Markup('includeurl', 'directives',


Patricia (France) => bad english

FR : Nécessite le fichier : extlinkedres.php à mettre dans 'cookbook' et extlinkedres.js à mettre dans Pub regoupés dans

EN : need extlinkedres.php in cookbook and extlinkedres.js in Pub.There are in


FR : Je fais mes premiers essais. Je complèterai ce commentaire ultérieurement.
EN : I try it. I put my comment in a few days.

Using IncludeUrl to embed files from a Subversion repository via TRAC

Here is how I, Christian Ridderström, have used this recipe to embed files from a Subversion repository via TRAC. Download the script as usual, then insert something like the following into your configuration file:

// Enable a restricted version of includeurl for embedding
// material from the repositor via TRAC
if(true) {
  DisableMarkup("includeurl");  // Arbitrary URIs may not be included 
  Markup('includesvn', 'directives',
         '/\\(:includesvn (.*?) (.*?)\\s*:\\)/ei',
         "IncludeSvn(\$pagename, PSS('$1'), PSS('$2'))");

  function IncludeSvn($pagename, $path, $opt) {
    $uri = ""
	. $path . "?format=raw";
    return IncludeUrl($pagename, $uri, $opt);

You can then use the markup (:includeSvn somefile :) to embed a file from the repository.----

$EnableExternalResource doesn't work on a site like

I'm trying to include the url above which is on my own server.

  • If $EnableExternalResource = 1; with (:includeurl :): It works

So i'd like to use the following relative path to increase the security

  • If $EnableExternalResource = 0; with (:includeurl /programme/jsxgraph/index.html :): It does not.

Is there a problem of path or syntax or other?

(For the moment this is the less worst way I found to embed these jsxgraphs. In fact, I would like to create a "safe" cookbook for this but I don't know how. If anybody knows how to include the header needed for this javascript? )

Jvamp January 25, 2016, at 01:27 AM 2016-01-21


Is it possible to include a https:// link via (:includeurl ... :)? I tried adding the https markup after the "add markup (:includeurl ... :)"-comment line in the includeurl.php file, however I only get text output on my wiki pages. Any suggestions?

Daniel 4.5.2023

If you use the "Alternative answer" version, https: urls should work in an inline frame. Note that cross-site embedding, where your website embeds content from a different website or domain, is increasingly difficult, and the other website and domain needs to have configured specific server response headers to allow embedding. If you use the "Answer" version, your PHP process needs to have network access, and indeed it only downloads the HTML content without the styles, scripts and pictures -- if the remote content links to such resources, they may be unavailable in your page. --Petko

Talk page for the IncludeUrl recipe (users).