MiniPage

PURPOSE

This macro is used to get the possibility to write inside a wiki table normal wiki code. This code is parsed by the wiki parser and is then displayed.

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

MiniPage.

1.9

MiniPage-1.8.4-6.py

1.8.4

MiniPage-1.7.1-5.py

1.7

MiniPage-1.6.0-4.py

1.6

MiniPage-1.6.0-2.py

1.6

MiniPage-1.3.3-1.py

1.3

CALLING SEQUENCE

   [[MiniPage(wikicode)]]

Note: MoinMoin versions > 1.6 new syntax for macro:

   <<MiniPage(wikicode)>>

INPUTS

wikicode: e.g. * item1

EXAMPLE

||Buttons ||[[MiniPage( * Redo\n * Undo)]][[MiniPage( * Quit)]]||
||Section ||[[MiniPage(= heading 1 =)]][[MiniPage(== heading 2 ==)]]||

||Buttons ||<<MiniPage( * Redo\n * Undo)>><<MiniPage( * Quit)>>||
||Section ||<<MiniPage(= heading 1 =)>><<MiniPage(== heading 2 ==)>>||

is shown as minipage.png

PROCEDURE

The \n mark is used for a line break.

Please remove the Version number from the code!

MODIFICATION HISTORY

Discussion

Nice simple solution!

Does this allow nesting within other types of markup? What I'd like to do is put a link as a heading, so would this create a heading called "FrontPage", which when clicked on takes you to the front page?

= [[MiniPage(["FrontPage"])]] =

Couldn't you use include() for that?

[[Include(FrontPage, "FrontPage", 1, titlesonly)]]

Please Note: the above example did not work for at least one user (me) running moinmoin 1.5.

Is there a possibility to include code parsers like that:

[[MiniPage({{{test1}}})]]

Is there a version of MiniPage that works on version 1.5.7? I used one of your examples and got the error: AttributeError: 'module' object has no attribute 'getParser' (Thanks in advance)

see MacroMarket/MiniPage-1.3.3-1.py getParser belongs to wikiutil changes for 1.6dev -- ReimarBauer 2007-04-10 06:54:34

Looks like "MiniPage" is broken on 1.7.0. TypeError: renderText() got an unexpected keyword argument 'line_anchors' (well, should be logged in first) -- MelaEckenfels 2008-06-30 11:04:11

Not sure what the changes in 1.8.4-6 are for: if I use "=" in minipage text, I get a traceback, e.g.

<<MiniPage(\n * list item 1 = hello\n * list item 2 = there)>>

Results in:

[Wed Oct 12 10:36:10 2011] [error] 2011-10-12 10:36:10,994 MoinMoin.macro ERROR Macro MiniPage (page: 'PaulHowarth') raised an exception:
[Wed Oct 12 10:36:10 2011] [error] Traceback (most recent call last):
[Wed Oct 12 10:36:10 2011] [error]   File "/usr/lib/python2.4/site-packages/MoinMoin/macro/__init__.py", line 122, in execute
[Wed Oct 12 10:36:10 2011] [error]     return execute(self, args)
[Wed Oct 12 10:36:10 2011] [error]   File "/usr/lib/python2.4/site-packages/MoinMoin/macro/__init__.py", line 106, in <lambda>
[Wed Oct 12 10:36:10 2011] [error]     execute = lambda _self, _args: wikiutil.invoke_extension_function(
[Wed Oct 12 10:36:10 2011] [error]   File "/usr/lib/python2.4/site-packages/MoinMoin/wikiutil.py", line 1951, in invoke_extension_function
[Wed Oct 12 10:36:10 2011] [error]     raise ValueError(_(u'No argument named "%s"') % (
[Wed Oct 12 10:36:10 2011] [error] ValueError: No argument named "\\n * list item 1"

With 1.7.1-5 this worked as expected. This is presumably due to the un-escaping of the "="? (this is with moin 1.9.3) -- Paul Howarth 2011-10-12 09:39:00

Have you tried

<<MiniPage("\n * list item 1 = hello\n * list item 2 = there")>>

I look at it later in detail, This is related to changes of the paramter parser. Thanks for reporting. -- ReimarBauer 2011-10-14 06:04:11

The 1.9 version seems to work nicely, thanks. -- Paul Howarth 2012-03-30 11:08:00

MoinMoin: MacroMarket/MiniPage (last edited 2012-03-30 11:10:03 by PaulHowarth)