[Moin-user] Adding an ID to a parsed HTML entity

Matt Savigear mcs_moinmoin at savigear.com
Fri May 4 18:29:00 EDT 2012


Hi,

I'm trying to find the easiest way to generate a "tree style" table of 
contents for my MoinMoin instance. What I need is a series of nested 
accordions or a full on tree with open/close widgets to the left as you 
would find in a standard folder-type or directory browser.

Now, I can easily create nested lists using the default wiki parser, but 
I'd like to know if there is a way of adding an "id" tag to the top 
level <ul> which is created (i.e. <ul id="myidentifier">) without 
manually building the whole list structure from scratch in HTML and 
having to manually create the page links.

That way I can just add a jQuery jsTree and convert the whole nested 
list structure in one shot: $('#myidentifier').jstree();

Of course, then I'll need to figure out how to persist the list state 
between page transition, but I think there's already a cookie method for 
doing that built in to the jsTree code.

Thanks for any pointers,

Matt.




More information about the Moin-user mailing list