[Moin-user] Collapsible list macro

Paul Moore p.f.moore at gmail.com
Tue Mar 30 16:39:48 EDT 2010

I'm looking for a means of adding a "collapsible menu" to my wiki.
I've searched the Macro market, and various other places on the web,
but haven't been able to find anything. Before I start writing my own,
does anyone know of an existing bit of code that does this?

Basically, I currently have a list in my wiki

  * Title 1
   * SubPageOne/SubSubOne
   * SubPageOne/SubSubTwo
   * SubPageOne/SubSubThree
  * Title 2
   * SubPageTwo/SubSubOne
   * SubPageTwo/SubSubTwo
   * SubPageTwo/SubSubThree

At the moment, this renders as a normal 2-level bulleted list. What
I'd like is for the list to initially render as only the top level
entries (Title 1, Title 2) and clicking on a top level entry to expand
it, showing the sublist below it. (The top level entries don't need to
be links to pages themselves).

There are some JavaScript libraries that do this sort of thing, but
they need the list to have additional markup. I can't think of a way
of adding the necessary markup to a MoinMoin list, so I'm guessing I'd
need some sort of parser or macro to create an appropriately marked up
list (unless anyone can point me at a JavaScript implementation that
works on a plain, un-marked up list).

Thanks for any pointers,

More information about the Moin-user mailing list