= Flexible Wiki Plugin = == Disclaimer == '''This project is not maintained anymore. Feel free to make a fork.''' '''Plugin is experimental and may have database query perfomance issues. At least, database structure should be improved.''' '''Plugin is in working state at the moment! Tested with version 0.11.7.''' == Overview == Plugin allows one to make flexible structure of wiki pages. Parent pages can be set up for any wiki page, so we get flexible structure instead of 'plain' wiki structure. == Download == Download the zipped source from [download:flexiblewikiplugin here]. == Source == You can check out FlexibleWikiPlugin from [http://trac-hacks.org/svn/flexiblewikiplugin here] using Subversion, or [source:flexiblewikiplugin browse the source] with Trac. == Description == 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 independent on their names.''' So, the 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 is installed a horozontal 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 start of navigation bar. For displaying navigation in 'tree' manner, special macro is provided, see details below. == Installation == 1. install plugin as any other Trac plugin ([http://trac.edgewall.org/wiki/TracPlugins#InstallingaTracPlugin how to?]) 2. '''upgrade''' your environment ([http://trac.edgewall.org/wiki/TracUpgrade#UpgradetheTracEnvironment how to?]) 3. note changes: * you should see '''New page''' button in main menu, if you see it, then plugin is active and working * you will also have extra fields in page edit dialog, see below 4. incorporate wiki macros ![[TracFlexWikiTree]] and ![[TracFlexWikiChildren]] somewhere in your template or just use them in your pages, there's no sidebar in default Trac templates, so you need manually customize template, see example. '''Extra page properties:''' * '''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]] '''Template example''' Here's quick demonstration example with ![[TracFlexWikiTree]] macro in left sidebar: see in attachment [attachment:site.html] or in source [source:flexiblewikiplugin/0.11/tracflexwiki/templates/site_example.html]. === 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: [attachment: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. == Bugs/Feature Requests == Existing bugs and feature requests for FlexibleWikiPlugin are [report:9?COMPONENT=FlexibleWikiPlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=FlexibleWikiPlugin&owner=rudyryk new ticket]. === 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 == [[ChangeLog(flexiblewikiplugin, 6)]] == Author/Contributors == '''Author:''' [wiki:rudyryk] [[BR]] '''Contributors:'''