Changes between Version 4 and Version 5 of NavigationMenuPlugin

Dec 9, 2006, 7:57:27 PM (12 years ago)

New way more advanced version


  • NavigationMenuPlugin

    v4 v5  
    33== Description ==
    5 This is a combination of the SubWiki and TocMacro plugin/macros. Basically it let's you have subtree browsing in a TracGuideToc menu style. Also allows for some usage of default menus.
     5=== General ===
    7 Most of the credit goes to the creators of the original hacks. I just combined them into one big ugly hack.
     7This is a newer version of the menu. It was originally just a simple menu based on SubWiki and TocMacro but now I have expanded it with a bunch of new functionality to make it more flexible. This menu is intended to be a heavy setup / low maintainance menu.
    9     If no parameters are supplied it generates the menu from the current page and any
    10     subpages it may have.
    11     {{{
    12         [[TOC]]
    13     }}}
    14     To generate subtrees from multiple pages you may pass in something like.
    15     {{{
    16     [[TOC(Trac, Wiki)]]
    17     }}}
    18     The following ''control'' arguments change the default behaviour of
    19     the TOC macro:
    20     || '''Argument'''    || '''Meaning''' ||
    21     || {{{heading=<x>}}} || Override the default heading of &#34;Table of Contents&#34; ||
    22     || {{{noheading}}}   || Suppress display of the heading. ||
    23     || {{{inline}}}      || Display TOC inline rather than as a side-bar. ||
    24     || {{{defmenu=<x>}}} || A default menu. Usefull if you add / remove subtrees often. ||
    25     Note that the current page must also be specified if individual wiki
    26     pages are given in the argument list.
    28     Defmenu usage:
    30     First make a page like:
    32     !http://localhost:8000/my-project/wiki/DefaultMenu
    34     Then on this page write a couple of comma separated pages you would like to have listed,
    35     just like you would do with normal parameters:
    37     Trac,Wiki
    39     Then add {{{[[TOC(defmenu=DefaultMenu)]]}}} to every page you want the menu on, now instead of
    40     having to change every page when you want to change the menu. You can just change the defaultmenu
    41     page.
     9Here is a list of the most general features.
     11 - A default menu for all pages read from a wikipage (DefaultNavigationMenu)
     12 - Ability to add sections or include other menus within menus (like the default one)
     13 - Ability to generate subtrees from pages
     14 - Ability to use WikiFormatting inside the menu
     15 - Generate a menu over headings on the current page
     17=== Menu scripting documentation ===
     19First of all make a new page called !DefaultNavigationMenu, and then add the {{{[[TOC]]}}} reference into some page where you want the menu, NOT on !DefaultNavigationMenu
     21''Optional Way''[[BR]]
     22Make a new page called whatever you like, example : !MyMenu. Then add {{{[[TOC(incmenu=MyMenu]]}}} to the page where you want to display the menu.
     24Now go and edit either DefaultNavigationMenu or the page you decided on for your menu. Then just start designing the menu as you like with the commands below, use new line (enter) to separate commands. You may also add empty lines but you may not have two commands on the same line.
     26|| '''Argument'''       || '''Meaning''' ||
     27|| SETTINGS             ||               ||
     28|| {{{heading=<x>}}}    || Override the default heading of "Table of Contents" ||
     29|| {{{noheading}}}      || Suppress display of the heading. ||
     30|| {{{inline}}}         || Display TOC inline rather than as a side-bar. ||
     31|| ACTIONS              ||                             ||
     32|| #text                || A comment line. Start the line with a has sign (#) ||
     33|| {{{[CPH]}}}          || Creates a page header list for the current page ||
     34|| {{{[S]Some/Page/Path}}} || Starts a section. If you specify something like !GameDesign, it will display on the !GameDesign page and all subpages !GameDesign/*. Sections can have multiple subsections. Note: It will also display on any similar pages like !GameDesign2/*. ||
     35|| {{{[!S]x}}}  || Ends the last opened section. You may place a comment where it says x to make it easier to read ||
     36|| {{{[N]}}}    || New line. Adds an empty line, similar to {{{[[BR]]}}} for WikiFormatting ||
     37|| {{{[H]x}}}   || Adds a header with the text x. ||
     38|| {{{[***}}}   || Starts a WikiFormatting section. Make sure you close it because all menu commands are ignored inside it, and it will not be rendered unless it is closed. You may include macros / other plugins or just wiki format code. Has to be written on a line by itself. ||
     39|| {{{***]}}}   || Ends the WikiFormatting section. Make sure you close all WikiFormatting sections or they will not render. ||
    4341== Bugs/Feature Requests ==
    5957== Example ==
    61 Some examples:
     59=== Page : !TestMyMenu ===
     61== Test My Menu ==
     65=== Page: !DefaultNavigationMenu ===
    64 [[TOC(defmenu=DefaultMenu)]]
     67# This is the default navigation menu page
     68# Any page that simply specify {{{[[TOC]]}}} will get this menu.
    66 [[TOC(heading=My Heading,Wiki,Trac,defmenu=SomeDefMenuPage)]]
     70heading=Default Navigation Menu
    68 [[TOC]]
     72#This will create a subtree for all pages that starts with Wiki
    70 [[TOC(RootPageOne,RootPageTwo,RootPageThree)]]
     75#Makes a new line
     77#Creates a link to all pages starting with TracNotification
     80#Only Show this section on pages starting with Trac
     83   #Overwrite the heading
     84   heading=Trac Section!
     86   #A new line and a header saying Trac
     87   [N]
     88   [H]Trac
     89   #Generate subtree for all pages starting with Trac
     90   Trac
     92   [S]TracNotification
     93      #Only show this on pages starting with TracNotification
     95      [N]
     96      [H]Where am i?
     97      [*** Start of WikiFormatting code
     99         You are now on the TracNotification page!
     101      ***] End WikiFormatting Code
     102      [N]
     104      #Imports another menu at this point
     105      incmenu=Menus/TracNotificationMenu
     107   [!S] End TracNotification Section
     109[!S]End Trac Section
     112[H]The time is
     113[*** WikiFormatting Begins
     115***] WikiFormatting Ends