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

IncludePage.py

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:

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)>>

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)

Discussion

MoinMoin: MacroMarket/IncludePage-1.7 (last edited 2015-04-08 19:39:51 by AlexOwen)