Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2008-05-11 17:30:44
Size: 75
Comment:
Revision 4 as of 2008-05-11 17:33:27
Size: 208
Comment: example
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Usage: {{{<<ChildPage(Discuss)>>}}}<<BR>>
Example: We want to link to a non-existant child page called <<ChildPage(FooBar)>><<BR>>

Download: ChildPage.py
Usage: <<ChildPage(Discuss)>>
Example: We want to link to a non-existant child page 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 
ChildPage.py

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