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.You are not allowed to attach a file to this page.