wiki:FlexibleWikiPlugin

Version 9 (modified by rudyryk, 5 years ago) (diff)

--

Flexible Wiki Plugin

Description

Plugin allows to make flexible structure of wiki pages. For any of wiki pages parent page can be set up. So we get flexible structure instead of 'plain' wiki structure.

Bugs/Feature Requests

Existing bugs and feature requests for FlexibleWikiPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

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

Example

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

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

So, page name is 'coupled' with structure - if you want to change structure, you should change page name or even name of many pages.

This plugin allows to structure pages idependent on their names. So, structure could be:

  • DevGuide
    • AddingResources
    • AddingPlugins
  • etc.

In this example pages AddingResources and AddingPlugins has parent DevGuide. So, if you want restructure pages, you should change 'parent' for page or some pages, and their address remain unchanged.

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

For displaying navigation in 'tree' manner, special macro is provided, see details below.

After installing plugin you will need to upgrade your environment.

Note changes:

  • you will get an extra item New page in mainnav, which opens page creation dialog
  • in edit page dialog you will see new fields: title, parent, weight, hide

Extra page properties description:

  • title: string, just page title, automatically displayed on top of page and in navigation
  • 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]]

Additional macros

Plugin provides extra wiki macros.

[[TracFlexWikiTree]]

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

Example:

[[TracFlexWikiTree(class=flex-menu)]]

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

Screenshot

Here's plugin in work - page editing: flexiblewikiplugin-scr1.jpg.

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

Navigation line above page title is inserted by this plugin automatically.

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

Further development

Some features are not implemented yet, like site map etc.

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!

Recent Changes

[7816] by rudyryk on 2010-04-06 00:16:20
flexiblewikiplugin: example for site.html - site_example.html
[7815] by rudyryk on 2010-04-05 23:04:56
flexiblewikiplugin: bigfix #6905 - getting current node for request
[5589] by rudyryk on 2009-04-24 19:31:12
  • TracFlexWikiPlugin source commited
[5588] by rudyryk on 2009-04-24 19:27:54
New hack FlexibleWikiPlugin, created by rudyryk

Author/Contributors

Author: rudyryk
Contributors:

Attachments (2)

Download all attachments as: .zip