Contents
IncludePage
Description
You can use this macro to include an external page, an interwiki page or a normal wiki page through an <iframe>.
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
|
|
|
Usage
<<IncludePage(FrontPage, 800, 600)>>
<<IncludePage(MoinMoin:FrontPage, 800, 600)>>
<<IncludePage(http://moinmo.in, 90%, 30%)>>
You need to specify at least the page to inline and the width and the height of the iframe.
Optionally you can customize ouput by using the following parameters:
- align=left/rigth: Aligns the frame to the left or right, text will float around [Default: no align and float]
- scrolling=yes/no: Turn on/off scrolling bars [Default: auto]
- marginwith=0: Set margin with [Default: 0]
- marginheight=0: Set margin height [Default: 0]
- frameborder=0: Set frameboarder [Default: 0]
- longdesc="Your text..": Give a sensible description for screenreader users [Default:""]
Warning:
Using <iframe> is not compliant with HTML strict standard. Therefore a common markup validation service will display an "invalid html" error message for a wiki page using this macro.
Example
<<IncludePage(FrontPage, 800, 600)>> <<IncludePage(MoinMoin:FrontPage, 800, 600)>> <<IncludePage(http://moinmo.in, 90%, 30%)>> <<IncludePage("https://www.google.com/calendar/embed?src=s7qj0ri12k4ovdmaoipbbiafj4@group.calendar.google.com", 800, 600)>>
Copyright
2008 by Oliver Siemoneit
License
GNU GPL
Bugs
When using MoinMoin 1.9.4 (on Debian) macro.format_error does not exists and so error messages are not displayed. The following patch solves this:
--- IncludePage.py.orig 2008-05-29 21:30:35.000000000 +0100 +++ IncludePage.py 2015-04-08 20:25:27.000000000 +0100 @@ -51,7 +51,7 @@ # Unpack parameters src, width, height = params except (ValueError, TypeError), err: - return macro.format_error(err) + return macro.formatter.text(u'<<%s: %s>>' % ('IncludePage', err.args[0])) # Prepare URL src = wikiutil.escape(src)