Flexible Wiki Plugin


This plugin allows you to create a flexible structure of your Trac wiki pages. Parent pages can be set up for any wiki page, so it is possible to create a flexible structure instead of a 'plain' wiki structure.

For example, if you want to structure the pages on your wiki and use the 'native' Trac approach, you should name your pages in a specific manner:

  • DevGuide
    • DevGuide/Resources
    • DevGuide/Plugins
  • etc.

So, page name is 'coupled' with structure. If you want to change the structure, then it is required to change the page name or even the names of multiple pages.

This plugin allows you to structure pages independent of their names. So, the structure could be:

  • DevGuide
    • AddingResources
    • AddingPlugins
  • etc.

In this example pages AddingResources and AddingPlugins have parent DevGuide. So, if you want to restructure pages, you should change 'parent' for either a single page or multiple pages, and their address remain unchanged.

When this plugin is installed a horizontal navigation bar is displayed on the top of each wiki page. So, when you look at the page AddingPlugins, the navigation bar will be: WikiStart / DevGuide / AddingPlugins . WikiStart is always at the start of the navigation bar.

To display the navigation in a 'tree' format, a special macro is provided, see details below.


Edit page screenshot

Note the extra navigation item New page and the extra fields Parent page, Hide from menu, Page weight.

The navigation line above the page title is inserted by this plugin automatically.

Menu in left sidebar is provided by macro [[TracFlexWikiTree]]. It's added globally in site templates, and this plugin doesn't do this automatically.


This plugin offers the following additional page properties:

  • title: string, just a page title, automatically displayed on top of the page and in the navigation bar
  • parent: name of parent wiki page or empty if none
  • weight: number, defines page ordering in menu
  • hide: flag, if set, page won't appear in menu generated by [[TracFlexWikiTree]]

There is also the following template example:

Here is a demonstration example with [[TracFlexWikiTree]] macro in left sidebar: see in attachment site.html or in source flexiblewikiplugin/0.11/tracflexwiki/templates/site_example.html.

Additional macros

Plugin provides the following additional wiki macros.


Shows wiki pages tree menu. Menu is generated as simple unordered list. Macro receives one optional parameter class, which defines CSS class of menu.



For now, the plugin does not generate initial structure data. So, for existing pages the structure of the data is not provided. That means, they are not displayed in TracFlexWikiTree until you edit and save them.

Further development

Some features are not implemented yet, like site map.

Plugin is a bit tricky: it adds extra key 'node' to request.args, that is instance of class TracFlexWikiNode, which provides something like API for this plugin.

Feedback is welcome!


This plugin is not maintained anymore. Feel free to make a fork.

This plugin is experimental and may have database query performance issues. At the very least, the database structure should be improved.

Plugin is in a working state at the moment: tested with version 0.11.7.

Bugs/Feature Requests

Existing bugs and feature requests for FlexibleWikiPlugin are here.

If you have any issues, create a new ticket.


2 / 2


1 / 1


1 / 1


Download the zipped source from here.


You can check out FlexibleWikiPlugin from here using Subversion, or browse the source with Trac.


  1. Install the plugin as on the TracPlugins page.
  2. Upgrade your environment as described on the TracUpgrade#UpgradetheTracEnvironment) page
  3. Note the following changes:
    • you should see New page button in the main menu. If it is present, then the plugin is active and working.
    • you will also have extra fields in the page edit dialog, see below.
  4. Incorporate the wiki macros [[TracFlexWikiTree]] and [[TracFlexWikiChildren]] somewhere in your template or just use them in your pages. There is no sidebar in the default Trac templates, so you need to manually customize the template, see example.

Recent Changes

7816 by rudyryk on 2010-04-05 22:16:20
flexiblewikiplugin: example for site.html - site_example.html
7815 by rudyryk on 2010-04-05 21:04:56
flexiblewikiplugin: bigfix #6905 - getting current node for request
5589 by rudyryk on 2009-04-24 17:31:12
  • TracFlexWikiPlugin source commited


Author: rudyryk
Maintainer: Alexey Kinyov

Last modified 11 months ago Last modified on Apr 22, 2022, 6:02:26 AM

Attachments (2)

Download all attachments as: .zip