Summary: Include an entire page in a wiki page
Version: 2019-03-28
Categories: Includes
Discussion: IncludeSite-Talk


How can I include a complete page in a wiki page?


First, be sure you're aware of the security and possible copyright risks of letting the content of other (arbitrary!) URLs appear in your pages.

Once you've gotten past that hurdle, download includeSite_7.2.phpΔ, rename it to includeSite.php and put it into the cookbook/ directory.

Add the following line into your config.php


That adds a (:includeSite http://...:) markup that lets you embed the contents of other pages into a wiki page.

The URL must be the first parameter and must be followed by a space even if you don't use any parameter.

Supported (optional) fields are:

  • height = in pixels, just the number
  • width = in pixels, just the number
  • border = in pixels, just the number
  • scroll = "auto"/"yes"/"no"
  • align = default/"left"/"right"/"middle"/"top"/"bottom"
  • style = a string, that represents a valid CSS-Style as "border: 2px solid blue;"
  • id = valid string
strings may be enclosed in double quotes (") or single quotes ('), but should not enclose double quotes

If the fields are not specified, the script defaults will be used. You can set these defaults in the script or (better) in the file config.php.

Include in your file lokal/config.php one or more of the following lines:

$DefaultWidth = 600;     
$DefaultHeight = 400;        
$DefaultAlign = 'left';       // left, right, middle, top, bottom
$DefaultScroll = 'auto';      // auto, yes, no
$DefaultStyle = 'border:3px outset #aaa; ';


The formerly parameter 'border' (thickness of the border) should no longer be used. It is replaced by 'style'. Nevertheless, existing 'border' parameters will be transformed into a 'style' parameter. And that is why you should not use both 'border' and 'style' as parameters.


(:includeSite width=700 height=330  scroll="yes" border=15 align="middle"    :)
(:includeSite border=7 :)
(:includeSite height=700 scroll="yes" style='border:2px solid red' id="my_name" width=500:)

See Also



See discussion at IncludeSite-Talk

User notes +2: 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.