Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2008-05-11 17:27:32
Size: 29
Comment:
Revision 3 as of 2008-05-11 17:32:12
Size: 118
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Download: [[attachment:ChildPage.py]] <<BR>>
Usage: {{{<<ChildPage(Discuss)>>}}}<<BR>>

Download: ChildPage.py
Usage: <<ChildPage(Discuss)>>

   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 
ChildPage.py

Macros/ChildPage (last edited 2008-05-11 18:08:46 by JasonMcArthur)