Changes between Version 26 and Version 27 of NavAddPlugin
- Timestamp:
- Mar 11, 2015, 3:02:13 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NavAddPlugin
v26 v27 1 1 [[PageOutline(2-4)]] 2 2 3 = Add custom items to main and meta navigation bar =3 = Add custom items to main and meta navigation bar 4 4 5 5 {{{#!div class="system-message" … … 7 7 }}} 8 8 9 == Description ==9 == Description 10 10 11 11 Starting with release 0.11, Trac allows existing items in the main and meta navigation bar menu items to be [TracInterfaceCustomization#CustomNavigationEntries customized], however it does not allow custom items to be added. This plugin allows you to add custom items ("buttons") to both the main and the meta navigation bar. Item name, title and URL can be specified in trac.ini, as well as an optional permission the user is required to have to see the item. … … 17 17 '''Fork:''' I have made a small [https://github.com/trac-hacks/trac-navadd fork on GitHub] with some improvements/fixes. Feel free to [https://github.com/trac-hacks/trac-navadd/issues suggest new]. For example, It supports TracLinks syntax for `url`, so if a link works in the wiki page itself, it should also in the menu. Install with `pip install NavAdd`. 18 18 19 == Configuration == 19 == Bugs/Feature Requests 20 21 Existing bugs and feature requests for NavAddPlugin are 22 [report:9?COMPONENT=NavAddPlugin here]. 23 24 If you have any issues, create a 25 [http://trac-hacks.org/newticket?component=NavAddPlugin&owner=otaku42 new ticket]. 26 27 [[TicketQuery(component=NavAddPlugin&group=type,format=progress)]] 28 29 == Download 30 31 Download the zipped source from [download:navaddplugin here]. 32 33 == Source 34 35 You can check out NavAddPlugin from [http://trac-hacks.org/svn/navaddplugin here] using Subversion, or [source:navaddplugin browse the source] with Trac. 36 37 == Configuration 20 38 21 39 Enable with: … … 24 42 navadd.* = enabled 25 43 }}} 26 All configuration settings are to be kept in a section called `[navadd]` in TracIni. The basic syntax is: 44 45 All configuration settings are to be kept in a section called `[navadd]` in `trac.ini`. The basic syntax is: 27 46 28 47 `add_items = <item>,<item>,...`:: comma-separated list of items that will be added; only items that are listed here will be processed. 29 48 30 Note: all items need to be in lowercase. If you use any uppercase character it will not work.49 '''Note''': All items need to be in lowercase. If you use any uppercase character it will not work. 31 50 32 51 And then for each item: … … 36 55 `<item>.target = <navbar_name>`:: the name of the navigation bar the button should be added to; only `mainnav` and `metanav` have been tested so far, others names probably work as well 37 56 38 === Example ===57 === Example 39 58 40 This is the configuration I use on [http://madwifi-project.org madwifi-project.org] to add a link to the imprint in the meta navigation bar, and a link to our download section on sf.net in the main navigation bar .59 This is the configuration I use on [http://madwifi-project.org madwifi-project.org] to add a link to the imprint in the meta navigation bar, and a link to our download section on sf.net in the main navigation bar: 41 60 42 61 {{{#!ini … … 55 74 The formats for the `url` parameter are the same as for the `href` parameter described at TracNavigation#Notes. 56 75 57 == Ordering of buttons ==76 == Ordering of buttons 58 77 59 It might be worth to note that buttons which are added with this plugin can be ordered in the usual way, i.e.by specifying the actual order in section `[trac]`, keywords `mainnav` and `metanav` in TracIni.78 Buttons which are added with this plugin can be ordered in the usual way, ie by specifying the actual order in section `[trac]`, keywords `mainnav` and `metanav` in TracIni. 60 79 61 === Example ===80 === Example 62 81 63 82 Let's assume that you add a button `Download` to your main navigation bar (same as in the configuration example above), and you want it to appear right after the `Wiki` button. The configuration then looks like: … … 68 87 }}} 69 88 70 == Bugs/Feature Requests == 71 72 Existing bugs and feature requests for NavAddPlugin are 73 [report:9?COMPONENT=NavAddPlugin here]. 74 75 If you have any issues, create a 76 [http://trac-hacks.org/newticket?component=NavAddPlugin&owner=otaku42 new ticket]. 77 78 == Download == 79 80 Download the zipped source from [download:navaddplugin here]. 81 82 == Source == 83 84 You can check out NavAddPlugin from [http://trac-hacks.org/svn/navaddplugin here] using Subversion, or [source:navaddplugin browse the source] with Trac. 85 86 == Recent Changes == 89 == Recent Changes 87 90 88 91 [[ChangeLog(navaddplugin, 3)]] 89 92 90 == Author/Contributors ==93 == Author/Contributors 91 94 92 95 '''Author:''' [wiki:otaku42] [[BR]] 93 '''Maintainer:''' rjollos[[BR]]96 '''Maintainer:''' [[Maintainer]] [[BR]] 94 97 '''Contributors:'''