Attachment 'NinePages.py'

Download

   1 # -*- coding: iso-8859-1 -*-
   2 """
   3     MoinMoin - Create list of stockCat Blog.
   4 """
   5 
   6 Dependencies = ['namespace']
   7 
   8 from MoinMoin.action import LikePages
   9 import MoinMoin.macro.Include
  10 
  11 def execute(macro, args):
  12     request = macro.request
  13 
  14     display_row = 3
  15     display_item = 3
  16     display_total = display_row * display_item
  17 
  18     this_pagename = "%s" % macro.request.themedict['q_page_name']
  19     
  20     formatter = macro.request.formatter
  21     attrs = {}
  22     attrs['valign'] = '"top"'
  23     result = formatter.table(True)
  24     result += formatter.table_row(True)
  25     for n in range(display_total):
  26         result += formatter.table_cell(True, attrs)
  27         result += include_link(macro, this_pagename + '/' + '%s' %n )
  28         result += formatter.table_cell(False)
  29         if not divmod(n + 1, display_item)[1]:
  30             result += formatter.table_row(False)
  31             result += formatter.table_row(True)
  32     result += formatter.table_row(False)
  33     result += formatter.table(False)
  34     return '%s' % ( result )
  35 
  36 def include_link(macro, args):
  37     include_page = MoinMoin.macro.Include.execute(macro, args)
  38     if include_page:
  39         return include_page
  40     else:
  41         theme = macro.request.theme
  42         themedict = macro.request.themedict
  43         themedict['q_page_name'] = args
  44         return theme.make_iconlink('view', themedict )

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2006-04-07 09:24:29, 24.9 KB) [[attachment:IMG_2408.sized.jpg]]
  • [get | view] (2006-06-05 09:11:43, 1.3 KB) [[attachment:LessHeader.py]]
  • [get | view] (2006-06-05 09:11:30, 1.3 KB) [[attachment:NinePages.py]]
  • [get | view] (2006-06-05 09:20:02, 74.4 KB) [[attachment:flower.jpg]]
  • [get | view] (2005-12-28 14:11:52, 32.1 KB) [[attachment:frankie_and_lok.jpg]]
  • [get | view] (2006-05-19 08:12:10, 15.6 KB) [[attachment:logo-sell-in-may3.jpg]]
  • [get | view] (2006-05-02 16:45:45, 11.9 KB) [[attachment:logo-stockcat.gif]]
  • [get | view] (2006-01-25 11:51:59, 1.2 KB) [[attachment:siteredirect.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.