Contents
CollectListsCategory
deprecated for 1.9.x please see DictColumns
This is a minor changed version of the original macro ../CollectLists by ReimarBauer. The main goal was, to CollectLists by using CategoryFoo and not subpages (like to original macro did).
Description
Will create a table column for every page found in "CategoryFoo" and fills in the data from each key value pair of a definition list.
- Optional you can give the template page the definition list page depends on or the column_heading. In the latter case the order is used.
Also it can optionally use definition list from another page name. By setting optional a parser one can use e.g. wiki markup from a different parser than MoinMoin.
- By filter_selection you can optional use the filter method of the data browser widget (this needs javascript enabled).
By using a different filter_column_value than the default, eg. name:: Cohen you get only rows shown where that name was found.
- By using the keyword transpose the table is shown transposed. Until transpose is not part of the data browser widget itself we don't support filter_selection by transpose=True.
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
0.2 ALPHA |
1.8.x |
first public release on MoinMoin |
Dependencies
Optional: SortableTables (JavaScript) http://moinmo.in/FeatureRequests/SortableTables
Patch Download: common.js.patch
Usage
First generate some normal wiki pages with definition lists (see here HelpOnLists#Definition_Lists), like this following example:
Tipp: if you use still subpages (like "Bugs/My Error Message" for this page, then user can easier switch down / between the main page with the table / collection.
= Problem to reload the page after saving = ID:: <only bug owner> Modul:: well Text:: After drinking a beer the bottle looks empty User:: Lotek Date:: <<DateTime(2009-10-21T18:03:55+0200)>> Priority:: low AssignTo:: JohnCarabi Status:: working ---- CategoryBug
example: data_page.png
And now you can create the "collection" page witch will collect the data and display them in a table:
= Summary = <<CollectListsCategory(CategoryBug,column_heading="Text,AssignTo,Priority,Status",filter_selection="AssignTo,Priority",filter_column_value="Status:: working")>>
example: collect_page.png
Will try now to explain the common attributes I use in this example:
Attributes |
Data |
Description |
pagename=unicode |
CategoryBug |
only pages with CategoryBug will be displayed |
align=("left", "center", "right") |
|
align table right, left, center... normally CSS stuff is much better ! |
column_heading=u' |
Text,AssignTo,Priority,Status |
only those column will be displayed, if empty all found column (from the first page) will be displayed |
template=u, |
|
|
transpose=False, |
|
|
filter_column_value=u, |
Status:: working |
only page with "Status:: working" will be displayed, good to filter and split the table even on differten pages |
parser=u'text_moin_wiki', |
|
parse as wiki markup (default) |
filter_selection=u'NeverExistingDefaultFilter') |
AssignTo,Priority |
use some filter (autofilter) for the column. in this example I use filters for AssignTo and Priority. |
Example
This will displayed all pages with CategoryBug and the table will contain all column found on the first match/page:
<<CollectListsCategory(CategoryBug)>>
for some limited times here is a live demo: http://www.wikiwiki.ch/Bugs
Copyright
2006 by michael cohen < scudette@users.sourceforge.net > (PageDicts)
2008-2009 by ReimarBauer (completely rewritten)
2009 by MarcelHäfner (minor rewrite to use CategoryFoo pages)
License
GNU GPL, see COPYING for details.
Bugs
Internet Explorer has some troubles with the feature "filter_selection" 2009-10-21
Also "filter_selection" has troubles if you have more then one table on a single page (only the first one is working) 2009-10-21
Discussion
I started to use this in my office for collecting information’s from user homepages together and build something like an central address book and also tried out to use this for some other ideas (bug tracking, music collection), etcetera. BUT there are some problems with this early alpha release or in general with this macro (imho):
- First you start to use a wiki like a database and a simple type error can lead to not shown the page in the collection, etcetera.
- The definition list stuff is not supported by the GUI editor, so users need to use text mode to edit, this is in my case the main problem
Because of this issues, I do not know how much I will use this macro in future MoinMoin Versions. But I would like to share it anyway, because I luv the idea to combine a wiki with some database function, and maybe in a future release of MoinMoin there is a better support for the GUI editor available. also the definition lists should maybe imputed via a form. Well, just some raw ideas... bye -- MarcelHäfner 2009-10-21 16:57:21
Hi Marcel, the recent DictColumns macro could use also the SinglePageSlideshow parser. You can select it by markup=title. Then every title on a page becomes a column header and the text below the title its value. -- ReimarBauer 2010-03-19 22:11:41