118
Comment:
|
226
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
Example: We want to link to a child page regardless if it exists or not called <<ChildPage(FooBar)>><<BR>> |
Download: ChildPage.py
Usage: <<ChildPage(Discuss)>>
Example: We want to link to a child page regardless if it exists or not called
FooBar
1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - Link to a child page
4 """
5
6 def execute(macro, text):
7 url = '%s/%s' % (macro.formatter.page.page_name, text)
8 html = '''
9 <a href="/%s">%s</a>
10 ''' % (url, text)
11 return html
12