CategoryMenu

Description

The CategoryMenu macro for MoinMoin provides support for navigation menus, placed in the page content itself, showing the categories present in a Wiki along with the pages belonging to the selected categories. Categories can be explicitly selected using macro arguments or implicitly selected using the category membership of the page on which the macro is used.

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

CategoryMenu-0.3.tar.gz

0.3

1.5, 1.6, 1.7, 1.8

README.txt

CategoryMenu-0.2.tar.gz

0.2

1.5, 1.6, 1.7, 1.8

README.txt

CategoryMenu-0.1.tar.gz

0.1

1.5, 1.6, 1.7

README.txt

Usage

Put <<CategoryMenu()>> (for Moin 1.5 use [[CategoryMenu()]]) to include a menu in a page. Specify category names as arguments to explicitly select categories of which the page is not a member.

Examples

## Show category list with page categories expanded:
<<CategoryMenu()>>
## Show category list with CategoryHomepage expanded:
<<CategoryMenu(Homepage)>>

Copyright (C) 2008, 2009 Paul Boddie <paul AT boddie DOT org DOT uk>

Some pieces of MoinMoin code were used in this work - specifically the category regular expression code from MoinMoin.config.multiconfig - and are thus covered by the following copyrights:

Copyright (C) 2000-2004 Juergen Hermann <jh AT web DOT de>

Copyright (C) 2005-2008 ThomasWaldmann

License

GNU General Public License version 2 or later

Bugs

Suggestions

Discussion

This macro is somewhat experimental and could probably be improved substantially. Initially, I thought that MoinMoin supported categories as a rigid concept associated with each page, but it would seem that category membership is more of a fluid property based on links to pages with the Category prefix, and I had to study the search support within MoinMoin to work out how to reliably determine category membership.

As a result, the performance of this macro is probably not as good as it should be, at least without Xapian searching enabled. See HelpOnXapian for installing Xapian and getting acceptable performance.


Pointed to this macro again in 2016-02-05 from your post in the moinmoin maillist, I have tried your macro categorymenu.

I see no big differences to the standard macro < <PageList(Category)> > I use, so why should I use your macro?

-- RudolfReuter 2016-02-05 06:35:35


Thanks for trying the macro, Rudolf! There aren't really any big differences apart from removing "Category" from all the names (which makes them more readable, especially for sites where people aren't expecting Moin-style naming) and showing pages within categories that apply to the current page (and to any selected categories).

So, I think it can be useful when you want to provide links to other pages in a category, while at the same time showing all the different categories. That may not be interesting for you, but it was something that I wanted to have myself. This was possibly my first macro, so it isn't very ambitious.

-- PaulBoddie 2016-02-05 12:05:37


MoinMoin: MacroMarket/CategoryMenu (last edited 2016-02-05 12:05:37 by PaulBoddie)