DictColumns
Description
<<DictColumns>>
will create on default a table row for every subpage of the current page. For subpages with definition lists it creates for each key a column. The value is assigned to the column.
This default behaviour is defined by the given default search_term. You can change the search_term keyword to any regex you want, e.g. search_term="category:CategoryExample". All arguments to the macro are optional.
By the title keyword you can set the column header for the first column where usually the pagenames are listed. Default is to show the page name where the macro is invoked from. You can give as an argument to the macro the name of the template_page the definition list page depends on. This forces column names used from the definition on this page. Also it can use the definition list from another page name.
You can also list the desired column names with the argument names. In the latter case the table columns will have the same order as the names listed.
By setting a parser one can use a different parser than moinmoin's default like for example wikimarkup.
With the argument filter_name you can use the filter method of the databrowser widget (this needs javascript enabled).
By using a different filter_value than the default empty one, eg. name=Cohen you get only rows shown where that name was found.
By using an alias_page you can show different column headers than the column names. This page can have a definition list of those keys you want renamed. The value of such a key is used as new name.
With sort given as list of names you can sort the table by multiple columns. And reverse as list of names sorts the table reverse. If you want to hide some columns you enter a name list to the hide keyword. By setting the keyword markup to title you can use instead of definition list markup title markup for separating the text for key value pairs.
@param pagename: name of the page @param title: entry in upper left corner of the table @param names: names of columns, key name of definition list (comma separated) @param sort: name of columns to sort by @param reverse: name of columns to reverse sort by @param hide: name of columns to hide @param filter_name: name of columns to filter by autofilter @param filter_value: dict definition for value of column to filter by @param template_page: pagename of the template for setting column names @param alias_page: pagename of the page for setting aliases for column names @param parser: name of the parser used to render markup @param markup: type of markup for separating key value pairs @param search_term: regex used to search for selecting pages
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
1.1 |
1.9.9 |
handle whitespace in page name when searching for sub pages |
|
|
1.9.3 |
Usage
<<DictColumns>>
Example
an example dictionary used for that page is
- book
- Python Cookbook
- author
- Alex Martelli
- language
- english
- prize
- 21.00
- in stock
- 37
Copyright
@copyright: 2006 by michael cohen <scudette@users.sourceforge.net> (PageDicts)
@copyright: 2008-2010 by ReimarBauer (completly rewritten)
License
GNU GPL, see COPYING for details.
Bugs
@sumpfralle, Do you want to send a pull request to https://bitbucket.org/ReimarBauer/moin1-extensions ?