Contents
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 |
|
1.9 |
|
|
|
1.8.4 |
|
|
|
1.7 |
|
|
|
1.6 |
|
|
|
1.6 |
|
|
|
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
PROCEDURE
The \n mark is used for a line break.
Please remove the Version number from the code!
MODIFICATION HISTORY
- Version 1.3.3.-1
@copyright: 2005-2008 by ReimarBauer
- @license: GNU GPL, see COPYING for details.
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"])]] =
- No, this will never work because headings cannot consist of markup. And a macro call is markup.
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.
please show the failure -- ReimarBauer 2006-11-19 18:49:21
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
- Changing the last line from
return wikiutil.renderText(request, Parser, text, line_anchors=False)
toreturn wikiutil.renderText(request, Parser, text)
works for me on 1.7.1.But I'm quite new to MoinMoin and Python, so use with care -- CarstenFrewert 2008-08-04 14:47:08
Thanks for the hint, need probably to upload some other plugins too -- ReimarBauer 2008-08-04 17:41:37
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