Short description

This request is about to get the NewPage macro to add a page below a users homepage if the user is valid. -- ReimarBauer 2006-05-30 06:15:54

   1 # HG changeset patch
   2 # User ReimarBauer@linux.site
   3 # Node ID b47c307ed9d555d4831b7d1275203795ddf1dfca
   4 # Parent  21095ba16b58c027af20fb1492636258e4e63174
   5 added creation of pages below homepages
   6 
   7 diff -r 21095ba16b58 -r b47c307ed9d5 MoinMoin/macro/NewPage.py
   8 --- a/MoinMoin/macro/NewPage.py	Tue Jul 04 10:31:25 2006 +0200
   9 +++ b/MoinMoin/macro/NewPage.py	Thu Jul 06 15:10:16 2006 +0200
  10 @@ -10,6 +10,9 @@
  11      @copyright: 2004 by Nir Soffer <nirs@freeshell.org>
  12      @copyright: 2004 Alexander Schremmer <alex AT alexanderweb DOT de>
  13      @license: GNU GPL, see COPYING for details.
  14 +    
  15 +    R.Bauer 2006-05-30: added feature of creating a page below the users homepage
  16 +                       [[NewPage(ThisTemplate, add a page below my HomePage, @ME)]]
  17  """
  18  
  19  from MoinMoin import wikiutil
  20 @@ -75,6 +78,9 @@ class NewPage:
  21          label = self.args.get('buttonLabel')
  22          nametemplate = self.args.get('nameTemplate') or u'%s'
  23          
  24 +        if parent == '@ME' and self.request.user.valid:
  25 +            parent = self.request.user.name
  26 +        
  27          requires_input = nametemplate.find('%s') != -1
  28          
  29          if label:

NewPage.patch

Some more ideas:


CategoryFeatureImplemented in 1.6-dev

MoinMoin: FeatureRequests/NewPageBelowUsersHomePage (last edited 2007-10-29 19:09:47 by localhost)